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: name: 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: name: phi_moveimm_subreg_input
37 # GCN: %{{[0-9]+}}:sreg_64 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
38 name: phi_moveimm_subreg_input
39 tracksRegLiveness: true
43 liveins: $sgpr0, $sgpr1
45 %0:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
47 %4:sreg_32 = COPY $sgpr0
48 %5:sreg_32 = COPY $sgpr1
52 undef %2.sub0:sreg_64 = S_ADD_U32 %4, %5, implicit-def $scc
57 %3:sreg_64 = PHI %1, %bb.3, %2, %bb.1
62 undef %1.sub0:sreg_64 = COPY %0
68 # GCN-LABEL: name: phi_moveimm_bad_opcode_input
69 # GCN-NOT: %{{[0-9]+}}:sreg_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
70 # GCN: %{{[0-9]+}}:vgpr_32 = PHI %{{[0-9]+}}, %bb.3, %{{[0-9]+}}, %bb.1
71 name: phi_moveimm_bad_opcode_input
72 tracksRegLiveness: true
76 liveins: $sgpr0, $sgpr1, $vgpr0
77 %6:vgpr_32 = COPY $vgpr0
78 %0:vgpr_32 = V_MOV_B32_sdwa 0, %6:vgpr_32, 0, 5, 2, 4, implicit $exec, implicit %6:vgpr_32(tied-def 0)
80 %4:sreg_32 = COPY $sgpr0
81 %5:sreg_32 = COPY $sgpr1
86 %2:sreg_32 = S_ADD_U32 %4, %5, implicit-def $scc
90 %3:sreg_32 = PHI %1, %bb.3, %2, %bb.1