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
112 lines
5.2 KiB
LLVM
112 lines
5.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
|
|
; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -mattr="-wavefrontsize32,+wavefrontsize64" -o - < %s | FileCheck -check-prefixes=SDAG-W64 %s
|
|
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -mattr="-wavefrontsize32,+wavefrontsize64" -o - < %s | FileCheck -check-prefixes=GISEL-W64 %s
|
|
; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -mattr="+wavefrontsize32,-wavefrontsize64" -o - < %s | FileCheck -check-prefixes=SDAG-W32 %s
|
|
; RUN: llc -global-isel=1 -new-reg-bank-select -mtriple=amdgcn-amd-amdpal -mcpu=gfx1100 -mattr="+wavefrontsize32,-wavefrontsize64" -o - < %s | FileCheck -check-prefixes=GISEL-W32 %s
|
|
|
|
; Use ballot for easy access to lanemask
|
|
|
|
define amdgpu_ps i64 @test_nor(i64 inreg %a, i64 inreg %b) {
|
|
; SDAG-W64-LABEL: test_nor:
|
|
; SDAG-W64: ; %bb.0:
|
|
; SDAG-W64-NEXT: s_nor_b64 s[0:1], s[0:1], s[2:3]
|
|
; SDAG-W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
|
|
; SDAG-W64-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1]
|
|
; SDAG-W64-NEXT: v_cmp_ne_u32_e64 s[0:1], 0, v0
|
|
; SDAG-W64-NEXT: s_waitcnt_depctr depctr_va_sdst(0)
|
|
; SDAG-W64-NEXT: ; return to shader part epilog
|
|
;
|
|
; GISEL-W64-LABEL: test_nor:
|
|
; GISEL-W64: ; %bb.0:
|
|
; GISEL-W64-NEXT: s_or_b64 s[0:1], s[0:1], s[2:3]
|
|
; GISEL-W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
|
|
; GISEL-W64-NEXT: s_xor_b64 s[0:1], s[0:1], exec
|
|
; GISEL-W64-NEXT: s_and_b64 s[0:1], s[0:1], exec
|
|
; GISEL-W64-NEXT: ; return to shader part epilog
|
|
;
|
|
; SDAG-W32-LABEL: test_nor:
|
|
; SDAG-W32: ; %bb.0:
|
|
; SDAG-W32-NEXT: s_nor_b32 s0, s0, s2
|
|
; SDAG-W32-NEXT: s_mov_b32 s1, 0
|
|
; SDAG-W32-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
|
|
; SDAG-W32-NEXT: s_delay_alu instid0(VALU_DEP_1)
|
|
; SDAG-W32-NEXT: v_cmp_ne_u32_e64 s0, 0, v0
|
|
; SDAG-W32-NEXT: ; return to shader part epilog
|
|
;
|
|
; GISEL-W32-LABEL: test_nor:
|
|
; GISEL-W32: ; %bb.0:
|
|
; GISEL-W32-NEXT: s_or_b32 s0, s0, s2
|
|
; GISEL-W32-NEXT: s_mov_b32 s1, 0
|
|
; GISEL-W32-NEXT: s_xor_b32 s0, s0, exec_lo
|
|
; GISEL-W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-W32-NEXT: s_and_b32 s0, s0, exec_lo
|
|
; GISEL-W32-NEXT: ; return to shader part epilog
|
|
%a.lanemask = call i1 @llvm.amdgcn.inverse.ballot.i64(i64 %a)
|
|
%b.lanemask = call i1 @llvm.amdgcn.inverse.ballot.i64(i64 %b)
|
|
%or = or i1 %a.lanemask, %b.lanemask
|
|
%xor = xor i1 %or, true
|
|
%r = call i64 @llvm.amdgcn.ballot.i64(i1 %xor)
|
|
ret i64 %r
|
|
}
|
|
|
|
define amdgpu_ps i64 @test_or_two_uses(i64 inreg %a, i64 inreg %b) {
|
|
; SDAG-W64-LABEL: test_or_two_uses:
|
|
; SDAG-W64: ; %bb.0:
|
|
; SDAG-W64-NEXT: s_or_b64 s[0:1], s[0:1], s[2:3]
|
|
; SDAG-W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
|
|
; SDAG-W64-NEXT: v_cndmask_b32_e64 v0, 0, 1, s[0:1]
|
|
; SDAG-W64-NEXT: s_xor_b64 s[0:1], s[0:1], -1
|
|
; SDAG-W64-NEXT: s_waitcnt_depctr depctr_sa_sdst(0)
|
|
; SDAG-W64-NEXT: v_cndmask_b32_e64 v1, 0, 1, s[0:1]
|
|
; SDAG-W64-NEXT: v_cmp_ne_u32_e32 vcc, 0, v0
|
|
; SDAG-W64-NEXT: s_delay_alu instid0(VALU_DEP_2)
|
|
; SDAG-W64-NEXT: v_cmp_ne_u32_e64 s[0:1], 0, v1
|
|
; SDAG-W64-NEXT: s_waitcnt_depctr depctr_va_sdst(0)
|
|
; SDAG-W64-NEXT: s_and_b64 s[0:1], s[0:1], vcc
|
|
; SDAG-W64-NEXT: ; return to shader part epilog
|
|
;
|
|
; GISEL-W64-LABEL: test_or_two_uses:
|
|
; GISEL-W64: ; %bb.0:
|
|
; GISEL-W64-NEXT: s_or_b64 s[0:1], s[0:1], s[2:3]
|
|
; GISEL-W64-NEXT: s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
|
|
; GISEL-W64-NEXT: s_xor_b64 s[2:3], s[0:1], exec
|
|
; GISEL-W64-NEXT: s_and_b64 s[0:1], s[0:1], exec
|
|
; GISEL-W64-NEXT: s_and_b64 s[2:3], s[2:3], exec
|
|
; GISEL-W64-NEXT: s_and_b64 s[0:1], s[2:3], s[0:1]
|
|
; GISEL-W64-NEXT: ; return to shader part epilog
|
|
;
|
|
; SDAG-W32-LABEL: test_or_two_uses:
|
|
; SDAG-W32: ; %bb.0:
|
|
; SDAG-W32-NEXT: s_or_b32 s0, s0, s2
|
|
; SDAG-W32-NEXT: s_mov_b32 s3, 0
|
|
; SDAG-W32-NEXT: v_cndmask_b32_e64 v0, 0, 1, s0
|
|
; SDAG-W32-NEXT: s_xor_b32 s0, s0, -1
|
|
; SDAG-W32-NEXT: s_mov_b32 s1, s3
|
|
; SDAG-W32-NEXT: v_cndmask_b32_e64 v1, 0, 1, s0
|
|
; SDAG-W32-NEXT: s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
|
|
; SDAG-W32-NEXT: v_cmp_ne_u32_e64 s0, 0, v0
|
|
; SDAG-W32-NEXT: v_cmp_ne_u32_e64 s2, 0, v1
|
|
; SDAG-W32-NEXT: s_and_b64 s[0:1], s[2:3], s[0:1]
|
|
; SDAG-W32-NEXT: ; return to shader part epilog
|
|
;
|
|
; GISEL-W32-LABEL: test_or_two_uses:
|
|
; GISEL-W32: ; %bb.0:
|
|
; GISEL-W32-NEXT: s_or_b32 s2, s0, s2
|
|
; GISEL-W32-NEXT: s_mov_b32 s1, 0
|
|
; GISEL-W32-NEXT: s_xor_b32 s0, s2, exec_lo
|
|
; GISEL-W32-NEXT: s_and_b32 s2, s2, exec_lo
|
|
; GISEL-W32-NEXT: s_and_b32 s0, s0, exec_lo
|
|
; GISEL-W32-NEXT: s_mov_b32 s3, s1
|
|
; GISEL-W32-NEXT: s_delay_alu instid0(SALU_CYCLE_1)
|
|
; GISEL-W32-NEXT: s_and_b64 s[0:1], s[0:1], s[2:3]
|
|
; GISEL-W32-NEXT: ; return to shader part epilog
|
|
%a.lanemask = call i1 @llvm.amdgcn.inverse.ballot.i64(i64 %a)
|
|
%b.lanemask = call i1 @llvm.amdgcn.inverse.ballot.i64(i64 %b)
|
|
%or = or i1 %a.lanemask, %b.lanemask
|
|
%xor = xor i1 %or, true
|
|
%r0 = call i64 @llvm.amdgcn.ballot.i64(i1 %xor)
|
|
%r1 = call i64 @llvm.amdgcn.ballot.i64(i1 %or)
|
|
%r = and i64 %r0, %r1
|
|
ret i64 %r
|
|
}
|