1 # RUN: llc -o - %s -march=amdgcn -mcpu=fiji -run-pass=si-insert-waitcnts -verify-machineinstrs | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: waitcnt-back-edge-loop
6 # GCN: $vgpr5 = V_CVT_I32_F32_e32 killed $vgpr5, implicit $exec
9 name: waitcnt-back-edge-loop
14 $vgpr1 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr1_vgpr2
15 $vgpr2 = V_MOV_B32_e32 0, implicit $exec, implicit-def $vgpr1_vgpr2
16 $vgpr4 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4 from `float addrspace(1)* null`, addrspace 1)
17 $vgpr0 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4 from `float addrspace(1)* null`, addrspace 1)
18 $sgpr0_sgpr1 = V_CMP_EQ_U32_e64 3, killed $sgpr4, implicit $exec
19 $vgpr3 = V_CNDMASK_B32_e64 0, -1082130432, 0, 1065353216, killed $sgpr0_sgpr1, implicit $exec
20 $vgpr5 = V_MOV_B32_e32 $vgpr0, implicit $exec, implicit $exec
26 $vgpr5 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4 from `float addrspace(1)* null`, addrspace 1)
29 successors: %bb.5, %bb.2
31 $vgpr5 = V_CVT_I32_F32_e32 killed $vgpr5, implicit $exec
32 V_CMP_NE_U32_e32 0, $vgpr5, implicit-def $vcc, implicit $exec
33 $vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
34 S_CBRANCH_VCCZ %bb.5, implicit killed $vcc
37 successors: %bb.4, %bb.3
39 V_CMP_EQ_U32_e32 9, killed $vgpr5, implicit-def $vcc, implicit $exec
40 $vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
41 S_CBRANCH_VCCZ %bb.3, implicit killed $vcc
44 successors: %bb.3, %bb.1
46 $vgpr5 = FLAT_LOAD_DWORD $vgpr1_vgpr2, 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile load 4 from `float addrspace(1)* null`, addrspace 1)
47 $vgpr4 = V_CVT_I32_F32_e32 $vgpr5, implicit $exec
48 V_CMP_EQ_U32_e32 2, killed $vgpr4, implicit-def $vcc, implicit $exec
49 $vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
50 $vgpr4 = V_MOV_B32_e32 $vgpr5, implicit $exec, implicit $exec
51 S_CBRANCH_VCCZ %bb.1, implicit killed $vcc
56 $vgpr4 = V_MAC_F32_e32 killed $vgpr0, killed $vgpr3, killed $vgpr4, implicit $exec
57 EXP_DONE 12, killed $vgpr4, undef $vgpr0, undef $vgpr0, undef $vgpr0, 0, 0, 15, implicit $exec
62 # GCN-LABEL: name: waitcnt-multiple-back-edges{{$}}
65 # GCN-NEXT: S_BRANCH %bb.2
67 name: waitcnt-multiple-back-edges
76 S_CBRANCH_VCCZ %bb.1, implicit $vcc
79 S_CBRANCH_VCCNZ %bb.5, implicit $vcc
82 BUFFER_ATOMIC_ADD_OFFSET renamable $vgpr0, renamable $sgpr12_sgpr13_sgpr14_sgpr15, 0, 4, 0, implicit $exec
83 S_CBRANCH_SCC0 %bb.2, implicit $scc
87 S_CBRANCH_SCC0 %bb.2, implicit $scc
91 S_CBRANCH_SCC1 %bb.0, implicit $scc