Home | History | Annotate | Download | only in AMDGPU
      1 # RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -o - %s | FileCheck %s
      2 
      3 # Check that the waitcnt pass does *not* insert a redundant waitcnt instr.
      4 # In this testcase, ensure that pass does not insert redundant S_WAITCNT 3952
      5 
      6 ...
      7 # CHECK-LABEL: name: waitcnt-no-redundant
      8 # CHECK: S_WAITCNT 3952
      9 # CHECK-NEXT: FLAT_ATOMIC_CMPSWAP
     10 # CHECK-NEXT: S_WAITCNT 3952
     11 # CHECK-NEXT: BUFFER_WBINVL1
     12 
     13 name: waitcnt-no-redundant
     14 body: |
     15   bb.0:
     16     renamable $vgpr0 = V_MOV_B32_e32 0, implicit $exec
     17 
     18   bb.1:
     19     S_WAITCNT 3952
     20     FLAT_ATOMIC_CMPSWAP undef renamable $vgpr0_vgpr1, renamable $vgpr0_vgpr1, 0, 0, implicit $exec, implicit $flat_scr
     21     S_WAITCNT 3952
     22     BUFFER_WBINVL1 implicit $exec
     23     S_BRANCH %bb.1
     24 
     25 ...
     26