llvm/llvm/test/CodeGen/AMDGPU/wait-before-stores-with-scope_sys.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -run-pass=si-memory-legalizer  %s -o - | FileCheck -check-prefix=GFX12 %s

---
name: intrinsic_store_system_scope
body: |
  bb.0:
    liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2

    ; GFX12-LABEL: name: intrinsic_store_system_scope
    ; GFX12: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4, $vgpr0, $vgpr1, $vgpr2
    ; GFX12-NEXT: {{  $}}
    ; GFX12-NEXT: S_WAIT_LOADCNT_soft 0
    ; GFX12-NEXT: S_WAIT_SAMPLECNT_soft 0
    ; GFX12-NEXT: S_WAIT_BVHCNT_soft 0
    ; GFX12-NEXT: S_WAIT_KMCNT_soft 0
    ; GFX12-NEXT: S_WAIT_STORECNT_soft 0
    ; GFX12-NEXT: BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr1_vgpr2, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
    ; GFX12-NEXT: S_ENDPGM 0
    BUFFER_STORE_DWORD_VBUFFER_BOTHEN_exact killed renamable $vgpr0, killed renamable $vgpr1_vgpr2, killed renamable $sgpr0_sgpr1_sgpr2_sgpr3, killed renamable $sgpr4, 0, 24, 0, implicit $exec :: (dereferenceable store (s32), align 1, addrspace 8)
    S_ENDPGM 0
...

---
name: generic_store_volatile
body: |
  bb.0:
    liveins: $vgpr0, $vgpr1, $vgpr2

    ; GFX12-LABEL: name: generic_store_volatile
    ; GFX12: liveins: $vgpr0, $vgpr1, $vgpr2
    ; GFX12-NEXT: {{  $}}
    ; GFX12-NEXT: S_WAIT_LOADCNT_soft 0
    ; GFX12-NEXT: S_WAIT_SAMPLECNT_soft 0
    ; GFX12-NEXT: S_WAIT_BVHCNT_soft 0
    ; GFX12-NEXT: S_WAIT_KMCNT_soft 0
    ; GFX12-NEXT: S_WAIT_STORECNT_soft 0
    ; GFX12-NEXT: GLOBAL_STORE_DWORD killed renamable $vgpr1_vgpr2, killed renamable $vgpr0, 0, 24, implicit $exec :: (volatile store (s32), addrspace 1)
    ; GFX12-NEXT: S_WAIT_STORECNT_soft 0
    ; GFX12-NEXT: S_ENDPGM 0
    GLOBAL_STORE_DWORD killed renamable $vgpr1_vgpr2, killed renamable $vgpr0, 0, 0, implicit $exec :: (volatile store (s32), addrspace 1)
    S_ENDPGM 0
...