xref: /llvm-project/llvm/test/CodeGen/AMDGPU/wait-before-stores-with-scope_sys.ll (revision 3277c7cd28154e33637a168acb26cea7ac1f7fff)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX12 %s
3; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX12 %s
4
5define amdgpu_ps void @intrinsic_store_system_scope(i32 %val, <4 x i32> inreg %rsrc, i32 %vindex, i32 %voffset, i32 inreg %soffset) {
6; GFX12-LABEL: intrinsic_store_system_scope:
7; GFX12:       ; %bb.0:
8; GFX12-NEXT:    buffer_store_b32 v0, v[1:2], s[0:3], s4 idxen offen scope:SCOPE_SYS
9; GFX12-NEXT:    s_endpgm
10  call void @llvm.amdgcn.struct.buffer.store.i32(i32 %val, <4 x i32> %rsrc, i32 %vindex, i32 %voffset, i32 %soffset, i32 24)
11  ret void
12}
13
14define amdgpu_ps void @generic_store_volatile(i32 %val, ptr addrspace(1) %out) {
15; GFX12-LABEL: generic_store_volatile:
16; GFX12:       ; %bb.0:
17; GFX12-NEXT:    global_store_b32 v[1:2], v0, off scope:SCOPE_SYS
18; GFX12-NEXT:    s_wait_storecnt 0x0
19; GFX12-NEXT:    s_endpgm
20  store volatile i32 %val, ptr addrspace(1) %out
21  ret void
22}
23