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
436 lines
14 KiB
LLVM
436 lines
14 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=amdgcn -mcpu=gfx1150 -amdgpu-sdwa-peephole=0 < %s | FileCheck -check-prefix=SDAG %s
|
|
; RUN: llc -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx1150 -amdgpu-sdwa-peephole=0 < %s | FileCheck -check-prefix=GISEL %s
|
|
|
|
define amdgpu_vs void @fcmp_f32_olt_to_ogt(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_olt_to_ogt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_gt_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_olt_to_ogt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_gt_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp olt float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_ogt_to_olt(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_ogt_to_olt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_lt_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_ogt_to_olt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_lt_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ogt float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_ole_to_oge(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_ole_to_oge:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_ge_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_ole_to_oge:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_ge_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ole float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_oge_to_ole(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_oge_to_ole:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_le_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_oge_to_ole:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_le_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp oge float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_ult_to_ugt(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_ult_to_ugt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nle_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_ult_to_ugt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nle_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ult float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_ugt_to_ult(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_ugt_to_ult:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nge_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_ugt_to_ult:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nge_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ugt float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_ule_to_uge(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_ule_to_uge:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nlt_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_ule_to_uge:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nlt_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ule float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f32_uge_to_ule(ptr addrspace(1) inreg %out, float inreg %a) {
|
|
; SDAG-LABEL: fcmp_f32_uge_to_ule:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_ngt_f32 s2, 2.0
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f32_uge_to_ule:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_ngt_f32 s2, 2.0
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp uge float 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_olt_to_ogt(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_olt_to_ogt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_gt_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_olt_to_ogt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_gt_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp olt half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_ogt_to_olt(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_ogt_to_olt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_lt_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_ogt_to_olt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_lt_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ogt half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_ole_to_oge(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_ole_to_oge:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_ge_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_ole_to_oge:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_ge_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ole half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_oge_to_ole(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_oge_to_ole:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_le_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_oge_to_ole:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_le_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp oge half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_ult_to_ugt(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_ult_to_ugt:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nle_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_ult_to_ugt:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nle_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ult half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_f16_ugt_to_ult(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_f16_ugt_to_ult:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nge_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_f16_ugt_to_ult:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nge_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ugt half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_ule_to_uge(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_ule_to_uge:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_nlt_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_ule_to_uge:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_nlt_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp ule half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
define amdgpu_vs void @fcmp_uge_to_ule(ptr addrspace(1) inreg %out, half inreg %a) {
|
|
; SDAG-LABEL: fcmp_uge_to_ule:
|
|
; SDAG: ; %bb.0: ; %entry
|
|
; SDAG-NEXT: s_cmp_ngt_f16 s2, 0x4000
|
|
; SDAG-NEXT: v_mov_b32_e32 v0, 0
|
|
; SDAG-NEXT: s_cselect_b32 s2, -1, 0
|
|
; SDAG-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; SDAG-NEXT: v_cndmask_b32_e64 v1, 0, -1, s2
|
|
; SDAG-NEXT: global_store_b32 v0, v1, s[0:1]
|
|
; SDAG-NEXT: s_endpgm
|
|
;
|
|
; GISEL-LABEL: fcmp_uge_to_ule:
|
|
; GISEL: ; %bb.0: ; %entry
|
|
; GISEL-NEXT: s_cmp_ngt_f16 s2, 0x4000
|
|
; GISEL-NEXT: v_mov_b32_e32 v1, 0
|
|
; GISEL-NEXT: s_cselect_b32 s2, -1, 0
|
|
; GISEL-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-NEXT: v_mov_b32_e32 v0, s2
|
|
; GISEL-NEXT: global_store_b32 v1, v0, s[0:1]
|
|
; GISEL-NEXT: s_endpgm
|
|
entry:
|
|
%0 = fcmp uge half 2.0, %a
|
|
%1 = sext i1 %0 to i32
|
|
store i32 %1, ptr addrspace(1) %out
|
|
ret void
|
|
}
|