Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

182 lines
5.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=riscv32 -global-isel < %s | FileCheck %s --check-prefixes=CHECK,CHECKI,RV32
; RUN: llc -mtriple=riscv64 -global-isel < %s | FileCheck %s --check-prefixes=CHECK,CHECKI,RV64
; RUN: llc -mtriple=riscv32 -mattr=+f -global-isel < %s | FileCheck %s --check-prefixes=CHECK,CHECKIF,RV32
; RUN: llc -mtriple=riscv64 -mattr=+f -global-isel < %s | FileCheck %s --check-prefixes=CHECK,CHECKIF,RV64
define i1 @phi_i1(i1 %cnd, i1 %a, i1 %b) {
; CHECK-LABEL: phi_i1:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mv a3, a0
; CHECK-NEXT: mv a0, a1
; CHECK-NEXT: andi a3, a3, 1
; CHECK-NEXT: bnez a3, .LBB0_2
; CHECK-NEXT: # %bb.1: # %cond.false
; CHECK-NEXT: mv a0, a2
; CHECK-NEXT: .LBB0_2: # %cond.end
; CHECK-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi i1 [ %b, %cond.false ], [ %a, %entry ]
ret i1 %cond
}
define i8 @phi_i8(i1 %cnd, i8 %a, i8 %b) {
; CHECK-LABEL: phi_i8:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mv a3, a0
; CHECK-NEXT: mv a0, a1
; CHECK-NEXT: andi a3, a3, 1
; CHECK-NEXT: bnez a3, .LBB1_2
; CHECK-NEXT: # %bb.1: # %cond.false
; CHECK-NEXT: mv a0, a2
; CHECK-NEXT: .LBB1_2: # %cond.end
; CHECK-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi i8 [ %b, %cond.false ], [ %a, %entry ]
ret i8 %cond
}
define i16 @phi_i16(i1 %cnd, i16 %a, i16 %b) {
; CHECK-LABEL: phi_i16:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mv a3, a0
; CHECK-NEXT: mv a0, a1
; CHECK-NEXT: andi a3, a3, 1
; CHECK-NEXT: bnez a3, .LBB2_2
; CHECK-NEXT: # %bb.1: # %cond.false
; CHECK-NEXT: mv a0, a2
; CHECK-NEXT: .LBB2_2: # %cond.end
; CHECK-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi i16 [ %b, %cond.false ], [ %a, %entry ]
ret i16 %cond
}
define i32 @phi_i32(i1 %cnd, i32 %a, i32 %b) {
; CHECK-LABEL: phi_i32:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mv a3, a0
; CHECK-NEXT: mv a0, a1
; CHECK-NEXT: andi a3, a3, 1
; CHECK-NEXT: bnez a3, .LBB3_2
; CHECK-NEXT: # %bb.1: # %cond.false
; CHECK-NEXT: mv a0, a2
; CHECK-NEXT: .LBB3_2: # %cond.end
; CHECK-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi i32 [ %b, %cond.false ], [ %a, %entry ]
ret i32 %cond
}
define i64 @phi_i64(i1 %cnd, i64 %a, i64 %b) {
; RV32-LABEL: phi_i64:
; RV32: # %bb.0: # %entry
; RV32-NEXT: mv a5, a0
; RV32-NEXT: mv a0, a1
; RV32-NEXT: mv a1, a2
; RV32-NEXT: andi a5, a5, 1
; RV32-NEXT: bnez a5, .LBB4_2
; RV32-NEXT: # %bb.1: # %cond.false
; RV32-NEXT: mv a0, a3
; RV32-NEXT: mv a1, a4
; RV32-NEXT: .LBB4_2: # %cond.end
; RV32-NEXT: ret
;
; RV64-LABEL: phi_i64:
; RV64: # %bb.0: # %entry
; RV64-NEXT: mv a3, a0
; RV64-NEXT: mv a0, a1
; RV64-NEXT: andi a3, a3, 1
; RV64-NEXT: bnez a3, .LBB4_2
; RV64-NEXT: # %bb.1: # %cond.false
; RV64-NEXT: mv a0, a2
; RV64-NEXT: .LBB4_2: # %cond.end
; RV64-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi i64 [ %b, %cond.false ], [ %a, %entry ]
ret i64 %cond
}
define ptr @phi_ptr(i1 %cnd, ptr %a, ptr %b) {
; CHECK-LABEL: phi_ptr:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mv a3, a0
; CHECK-NEXT: mv a0, a1
; CHECK-NEXT: andi a3, a3, 1
; CHECK-NEXT: bnez a3, .LBB5_2
; CHECK-NEXT: # %bb.1: # %cond.false
; CHECK-NEXT: mv a0, a2
; CHECK-NEXT: .LBB5_2: # %cond.end
; CHECK-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi ptr [ %b, %cond.false ], [ %a, %entry ]
ret ptr %cond
}
define float @phi_float(i1 %cnd, float %a, float %b) {
; CHECKI-LABEL: phi_float:
; CHECKI: # %bb.0: # %entry
; CHECKI-NEXT: mv a3, a0
; CHECKI-NEXT: mv a0, a1
; CHECKI-NEXT: andi a3, a3, 1
; CHECKI-NEXT: bnez a3, .LBB6_2
; CHECKI-NEXT: # %bb.1: # %cond.false
; CHECKI-NEXT: mv a0, a2
; CHECKI-NEXT: .LBB6_2: # %cond.end
; CHECKI-NEXT: ret
;
; CHECKIF-LABEL: phi_float:
; CHECKIF: # %bb.0: # %entry
; CHECKIF-NEXT: andi a0, a0, 1
; CHECKIF-NEXT: bnez a0, .LBB6_2
; CHECKIF-NEXT: # %bb.1: # %cond.false
; CHECKIF-NEXT: fmv.s fa0, fa1
; CHECKIF-NEXT: .LBB6_2: # %cond.end
; CHECKIF-NEXT: ret
entry:
br i1 %cnd, label %cond.end, label %cond.false
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %entry, %cond.false
%cond = phi float [ %b, %cond.false ], [ %a, %entry ]
ret float %cond
}