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
46 lines
1.8 KiB
LLVM
46 lines
1.8 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=amdgcn -o - %s | FileCheck -check-prefix=GCN %s
|
|
|
|
declare i32 @llvm.cttz.i32(i32, i1) nounwind readnone
|
|
declare i32 @llvm.amdgcn.sffbh.i32(i32) nounwind readnone speculatable
|
|
define amdgpu_kernel void @select_constant_cttz(ptr addrspace(1) noalias %out, ptr addrspace(1) nocapture readonly %arrayidx) nounwind {
|
|
; GCN-LABEL: select_constant_cttz:
|
|
; GCN: ; %bb.0:
|
|
; GCN-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x9
|
|
; GCN-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GCN-NEXT: s_load_dword s2, s[2:3], 0x0
|
|
; GCN-NEXT: s_mov_b32 s3, 0xf000
|
|
; GCN-NEXT: s_waitcnt lgkmcnt(0)
|
|
; GCN-NEXT: s_lshr_b32 s4, 1, s2
|
|
; GCN-NEXT: s_cmp_lg_u32 s2, 0
|
|
; GCN-NEXT: s_ff1_i32_b32 s2, s4
|
|
; GCN-NEXT: s_cselect_b64 s[4:5], -1, 0
|
|
; GCN-NEXT: s_and_b64 s[6:7], s[4:5], exec
|
|
; GCN-NEXT: s_cselect_b32 s2, -1, s2
|
|
; GCN-NEXT: s_flbit_i32 s6, s2
|
|
; GCN-NEXT: s_sub_i32 s8, 31, s6
|
|
; GCN-NEXT: s_cmp_eq_u32 s2, 0
|
|
; GCN-NEXT: s_cselect_b64 s[6:7], -1, 0
|
|
; GCN-NEXT: s_or_b64 s[4:5], s[4:5], s[6:7]
|
|
; GCN-NEXT: s_and_b64 s[4:5], s[4:5], exec
|
|
; GCN-NEXT: s_cselect_b32 s4, -1, s8
|
|
; GCN-NEXT: s_mov_b32 s2, -1
|
|
; GCN-NEXT: v_mov_b32_e32 v0, s4
|
|
; GCN-NEXT: buffer_store_dword v0, off, s[0:3], 0
|
|
; GCN-NEXT: s_endpgm
|
|
%v = load i32, ptr addrspace(1) %arrayidx, align 4
|
|
%sr = lshr i32 1, %v
|
|
%cmp = icmp ne i32 %v, 0
|
|
%cttz = call i32 @llvm.cttz.i32(i32 %sr, i1 true), !range !0
|
|
%sel = select i1 %cmp, i32 -1, i32 %cttz
|
|
%ffbh = call i32 @llvm.amdgcn.sffbh.i32(i32 %sel)
|
|
%sub = sub i32 31, %ffbh
|
|
%cmp2 = icmp eq i32 %sel, 0
|
|
%or = or i1 %cmp, %cmp2
|
|
%sel2 = select i1 %or, i32 -1, i32 %sub
|
|
store i32 %sel2, ptr addrspace(1) %out
|
|
ret void
|
|
}
|
|
|
|
!0 = !{i32 0, i32 33}
|