Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/AMDGPU/machine-sink-fence.ll
T
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

45 lines
1.6 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck %s
; Check that the ds_load_b32 instruction is not sunk past the
; fence-barrier-fence sequence.
define amdgpu_kernel void @test_fence(ptr addrspace(1) %arg, i1 %arg1) {
; CHECK-LABEL: test_fence:
; CHECK: ; %bb.0: ; %bb
; CHECK-NEXT: v_mov_b32_e32 v1, 0
; CHECK-NEXT: s_load_b32 s0, s[4:5], 0x2c
; CHECK-NEXT: ds_load_b32 v1, v1
; CHECK-NEXT: s_wait_kmcnt 0x0
; CHECK-NEXT: s_bitcmp0_b32 s0, 0
; CHECK-NEXT: s_wait_dscnt 0x0
; CHECK-NEXT: s_barrier_signal -1
; CHECK-NEXT: s_barrier_wait -1
; CHECK-NEXT: global_inv scope:SCOPE_SE
; CHECK-NEXT: s_cbranch_scc1 .LBB0_2
; CHECK-NEXT: ; %bb.1: ; %bb2
; CHECK-NEXT: s_load_b64 s[0:1], s[4:5], 0x24
; CHECK-NEXT: v_and_b32_e32 v0, 0x3ff, v0
; CHECK-NEXT: s_delay_alu instid0(VALU_DEP_1)
; CHECK-NEXT: v_lshlrev_b32_e32 v0, 2, v0
; CHECK-NEXT: s_wait_kmcnt 0x0
; CHECK-NEXT: global_atomic_add_u32 v0, v1, s[0:1] scope:SCOPE_SYS
; CHECK-NEXT: .LBB0_2: ; %bb8
; CHECK-NEXT: s_endpgm
bb:
%i6 = load i32, ptr addrspace(3) null
fence syncscope("workgroup") release
tail call void @llvm.amdgcn.s.barrier.signal(i32 -1)
tail call void @llvm.amdgcn.s.barrier.wait(i16 -1)
fence syncscope("workgroup") acquire
br i1 %arg1, label %bb2, label %bb8
bb2:
%i3 = tail call i32 @llvm.amdgcn.workitem.id.x()
%i5 = getelementptr i32, ptr addrspace(1) %arg, i32 %i3
%i7 = atomicrmw add ptr addrspace(1) %i5, i32 %i6 monotonic
br label %bb8
bb8:
ret void
}