blob: 83df94af7bcad7fca3c846c3c08f3d08a072e22f [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -mtriple=amdgpu9.00 -amdgpu-waitcnt-forcezero < %s | FileCheck --check-prefix=GFX9 %s
; RUN: llc -mtriple=amdgpu12.00 -amdgpu-waitcnt-forcezero < %s | FileCheck --check-prefix=GFX12 %s
; Regression test for an unsigned-underflow infinite loop in the Pre-GFX12
; waitcnt profiling expansion (WaitcntGeneratorPreGFX12::createNewWaitcnt).
define amdgpu_kernel void @no_outstanding(ptr addrspace(1) %p) #0 {
; GFX9-LABEL: no_outstanding:
; GFX9: ; %bb.0:
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: s_waitcnt expcnt(0)
; GFX9-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x24
; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
; GFX9-NEXT: v_mov_b32_e32 v0, 0
; GFX9-NEXT: s_waitcnt vmcnt(0)
; GFX9-NEXT: s_waitcnt lgkmcnt(0)
; GFX9-NEXT: s_waitcnt expcnt(0)
; GFX9-NEXT: global_store_dword v0, v0, s[0:1]
; GFX9-NEXT: s_endpgm
;
; GFX12-LABEL: no_outstanding:
; GFX12: ; %bb.0:
; GFX12-NEXT: s_wait_loadcnt 0x0
; GFX12-NEXT: s_wait_dscnt 0x0
; GFX12-NEXT: s_wait_expcnt 0x0
; GFX12-NEXT: s_wait_samplecnt 0x0
; GFX12-NEXT: s_wait_bvhcnt 0x0
; GFX12-NEXT: s_wait_kmcnt 0x0
; GFX12-NEXT: s_load_b64 s[0:1], s[4:5], 0x24
; GFX12-NEXT: s_wait_loadcnt 0x0
; GFX12-NEXT: s_wait_dscnt 0x0
; GFX12-NEXT: s_wait_expcnt 0x0
; GFX12-NEXT: s_wait_samplecnt 0x0
; GFX12-NEXT: s_wait_bvhcnt 0x0
; GFX12-NEXT: s_wait_kmcnt 0x0
; GFX12-NEXT: v_mov_b32_e32 v0, 0
; GFX12-NEXT: s_wait_loadcnt 0x0
; GFX12-NEXT: s_wait_dscnt 0x0
; GFX12-NEXT: s_wait_expcnt 0x0
; GFX12-NEXT: s_wait_samplecnt 0x0
; GFX12-NEXT: s_wait_bvhcnt 0x0
; GFX12-NEXT: s_wait_kmcnt 0x0
; GFX12-NEXT: global_store_b32 v0, v0, s[0:1]
; GFX12-NEXT: s_endpgm
store i32 0, ptr addrspace(1) %p
ret void
}
attributes #0 = { "amdgpu-expand-waitcnt-profiling" }