brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 41fcd78 Raw
30 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck -check-prefix=GFX12 %s3 4# Check that we correctly track that GLOBAL_INV increases LOAD_cnt.5# We use a straightforward dependency between a GLOBAL_LOAD and an instruction6# that uses its result - the S_WAIT_LOADCNT introduced before the use should7# reflect the fact that there is a GLOBAL_INV between them.8# FIXME: We could get away with a S_WAIT_LOADCNT 1 here.9---10name: waitcnt-global-inv11machineFunctionInfo:12  isEntryFunction: true13body: |14  bb.0:15    liveins: $vgpr0, $vgpr1, $sgpr2_sgpr316 17    ; GFX12-LABEL: name: waitcnt-global-inv18    ; GFX12: liveins: $vgpr0, $vgpr1, $sgpr2_sgpr319    ; GFX12-NEXT: {{  $}}20    ; GFX12-NEXT: renamable $vgpr0 = GLOBAL_LOAD_DWORD_SADDR renamable $sgpr2_sgpr3, killed $vgpr0, 0, 0, implicit $exec :: (load (s32), addrspace 1)21    ; GFX12-NEXT: GLOBAL_INV 16, implicit $exec22    ; GFX12-NEXT: S_WAIT_LOADCNT 123    ; GFX12-NEXT: $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec, implicit $exec24    renamable $vgpr0 = GLOBAL_LOAD_DWORD_SADDR renamable $sgpr2_sgpr3, killed $vgpr0, 0, 0, implicit $exec :: (load (s32), addrspace 1)25    GLOBAL_INV 16, implicit $exec26    $vgpr2 = V_MOV_B32_e32 $vgpr0, implicit $exec, implicit $exec27...28 29# TODO: Test for GLOBAL_WB, GLOBAL_WBINV30