1 # RUN: llc -mtriple amdgcn -run-pass livevars -run-pass phi-node-elimination -verify-machineinstrs -o - %s | FileCheck %s
3 # CHECK-LABEL: phi-cf-test
5 # CHECK: [[COND:%[0-9]+]]:sreg_64 = V_CMP_EQ_U32_e64
6 # CHECK: [[IF_SOURCE0:%[0-9]+]]:sreg_64 = SI_IF [[COND]], %bb.1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
7 # CHECK: [[IF_INPUT_REG:%[0-9]+]]:sreg_64 = S_MOV_B64_term killed [[IF_SOURCE0]], implicit $exec
10 # CHECK: [[END_CF_ARG:%[0-9]+]]:sreg_64 = COPY killed [[IF_INPUT_REG]]
11 # CHECK: SI_END_CF killed [[END_CF_ARG]], implicit-def dead $exec, implicit-def dead $scc, implicit $exec
14 # CHECK: [[IF_SOURCE1:%[0-9]+]]:sreg_64 = SI_IF [[COND]], %bb.1, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
15 # CHECK: [[IF_INPUT_REG]]:sreg_64 = S_MOV_B64_term killed [[IF_SOURCE1]], implicit $exec
21 tracksRegLiveness: true
25 successors: %bb.3(0x40000000), %bb.2(0x40000000)
28 %5:vgpr_32(s32) = COPY $vgpr0
29 %0:sreg_64 = V_CMP_EQ_U32_e64 0, %5(s32), implicit $exec
30 %18:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
31 %22:sreg_64 = SI_IF %0, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
35 successors: %bb.3(0x80000000)
37 %24:sreg_64 = PHI %20, %bb.3, %22, %bb.0
38 %23:vgpr_32 = PHI %19, %bb.3, %18, %bb.0
39 SI_END_CF %24, implicit-def dead $exec, implicit-def dead $scc, implicit $exec
40 %3:vgpr_32, dead %10:sreg_64 = nsw V_ADD_I32_e64 1, %23, 0, implicit $exec
43 successors: %bb.3(0x40000000), %bb.2(0x40000000)
45 %4:vgpr_32 = PHI %19, %bb.3, %3, %bb.2, %18, %bb.0
46 %15:sreg_32_xm0 = S_MOV_B32 61440
47 %16:sreg_32_xm0 = S_MOV_B32 -1
48 %17:sgpr_128 = REG_SEQUENCE undef %14:sreg_32_xm0, %subreg.sub0, undef %12:sreg_32_xm0, %subreg.sub1, %16, %subreg.sub2, %15, %subreg.sub3
49 BUFFER_STORE_DWORD_OFFSET %4, %17, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (volatile store 4 into `i32 addrspace(1)* undef`, addrspace 1)
51 %20:sreg_64 = SI_IF %0, %bb.2, implicit-def dead $exec, implicit-def dead $scc, implicit $exec