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

135 lines
3.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=mipsel-linux-gnu -mcpu=mips32r2 -O2 -relocation-model=pic \
; RUN: -fast-isel -fast-isel-abort=1 | FileCheck %s
; FIXME: The first xor instruction is redundant.
define i1 @sel_i1(i1 %j, i1 %k, i1 %l) {
; CHECK-LABEL: sel_i1:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xor $1, $4, $zero
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: movn $6, $5, $1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $6
entry:
%cond = xor i1 %j, false
%res = select i1 %cond, i1 %k, i1 %l
ret i1 %res
}
; FIXME: The seb $X, $zero and xor .., .., $x instructions are redundant.
define i8 @sel_i8(i8 %j, i8 %k, i8 %l) {
; CHECK-LABEL: sel_i8:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: seb $1, $4
; CHECK-NEXT: seb $2, $zero
; CHECK-NEXT: xor $1, $1, $2
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: movn $6, $5, $1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $6
entry:
%cond = icmp ne i8 %j, 0
%res = select i1 %cond, i8 %k, i8 %l
ret i8 %res
}
; FIXME: The seh $X, $zero and xor .., .., $x instructions are redundant.
define i16 @sel_i16(i16 %j, i16 %k, i16 %l) {
; CHECK-LABEL: sel_i16:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: seh $1, $4
; CHECK-NEXT: seh $2, $zero
; CHECK-NEXT: xor $1, $1, $2
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: movn $6, $5, $1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $6
entry:
%cond = icmp ne i16 %j, 0
%res = select i1 %cond, i16 %k, i16 %l
ret i16 %res
}
; FIXME: The first xor instruction is redundant.
define i32 @sel_i32(i32 %j, i32 %k, i32 %l) {
; CHECK-LABEL: sel_i32:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xor $1, $4, $zero
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: movn $6, $5, $1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: move $2, $6
entry:
%cond = icmp ne i32 %j, 0
%res = select i1 %cond, i32 %k, i32 %l
ret i32 %res
}
define float @sel_float(i32 %j, float %k, float %l) {
; CHECK-LABEL: sel_float:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mtc1 $6, $f0
; CHECK-NEXT: mtc1 $5, $f1
; CHECK-NEXT: xor $1, $4, $zero
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: movn.s $f0, $f1, $1
entry:
%cond = icmp ne i32 %j, 0
%res = select i1 %cond, float %k, float %l
ret float %res
}
define float @sel_float2(float %k, float %l, i32 %j) {
; CHECK-LABEL: sel_float2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mov.s $f0, $f14
; CHECK-NEXT: xor $1, $6, $zero
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: movn.s $f0, $f12, $1
entry:
%cond = icmp ne i32 %j, 0
%res = select i1 %cond, float %k, float %l
ret float %res
}
define double @sel_double(i32 %j, double %k, double %l) {
; CHECK-LABEL: sel_double:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mtc1 $6, $f2
; CHECK-NEXT: mthc1 $7, $f2
; CHECK-NEXT: ldc1 $f0, 16($sp)
; CHECK-NEXT: xor $1, $4, $zero
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: movn.d $f0, $f2, $1
entry:
%cond = icmp ne i32 %j, 0
%res = select i1 %cond, double %k, double %l
ret double %res
}
define double @sel_double2(double %k, double %l, i32 %j) {
; CHECK-LABEL: sel_double2:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: mov.d $f0, $f14
; CHECK-NEXT: lw $1, 16($sp)
; CHECK-NEXT: xor $1, $1, $zero
; CHECK-NEXT: sltu $1, $zero, $1
; CHECK-NEXT: andi $1, $1, 1
; CHECK-NEXT: jr $ra
; CHECK-NEXT: movn.d $f0, $f12, $1
entry:
%cond = icmp ne i32 %j, 0
%res = select i1 %cond, double %k, double %l
ret double %res
}