1 # RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass=si-fix-sgpr-copies -o - %s | FileCheck -check-prefix=GCN %s
3 # GCN_LABEL: phi_moveimm_input
4 # GCN-NOT: %{{[0-9]+}}:vgpr_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
5 # GCN: %{{[0-9]+}}:sreg_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
7 name: phi_moveimm_input
8 tracksRegLiveness: true
12 liveins: $sgpr0, $sgpr1
14 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
16 %4:sreg_32 = COPY $sgpr0
17 %5:sreg_32 = COPY $sgpr1
21 %2:sreg_32 = S_ADD_U32 %4, %5, implicit-def $scc
26 %3:sreg_32 = PHI %1, %bb.3, %2, %bb.1
36 # GCN_LABEL: phi_moveimm_subreg_input
37 # GCN-NOT: %{{[0-9]+}}:sreg_64 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
38 # GCN: %{{[0-9]+}}:vreg_64 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
39 name: phi_moveimm_subreg_input
40 tracksRegLiveness: true
44 liveins: $sgpr0, $sgpr1
46 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
48 %4:sreg_32 = COPY $sgpr0
49 %5:sreg_32 = COPY $sgpr1
53 undef %2.sub0:sreg_64 = S_ADD_U32 %4, %5, implicit-def $scc
58 %3:sreg_64 = PHI %1, %bb.3, %2, %bb.1
63 undef %1.sub0:sreg_64 = COPY %0
69 # GCN_LABEL: phi_moveimm_bad_opcode_input
70 # GCN-NOT: %{{[0-9]+}}:sreg_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
71 # GCN: %{{[0-9]+}}:vgpr_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
72 name: phi_moveimm_bad_opcode_input
73 tracksRegLiveness: true
77 liveins: $sgpr0, $sgpr1, $vgpr0
78 %6:vgpr_32 = COPY $vgpr0
79 %0:vgpr_32 = V_MOV_B32_sdwa 0, %6:vgpr_32, 0, 5, 2, 4, implicit $exec, implicit %6:vgpr_32(tied-def 0)
81 %4:sreg_32 = COPY $sgpr0
82 %5:sreg_32 = COPY $sgpr1
87 %2:sreg_32 = S_ADD_U32 %4, %5, implicit-def $scc
91 %3:sreg_32 = PHI %1, %bb.3, %2, %bb.1