1 # RUN: llc -march=amdgcn -run-pass=si-fix-sgpr-copies -o - %s | FileCheck --check-prefix=GCN %s
3 # GCN-LABEL: name: fix-sgpr-copies
10 %0:vgpr_32 = IMPLICIT_DEF
11 %1:sreg_32 = IMPLICIT_DEF
12 %2:sreg_32 = IMPLICIT_DEF
13 %3:sreg_32 = IMPLICIT_DEF
14 %4:vgpr_32 = V_CVT_U32_F32_e64 0, %0:vgpr_32, 0, 0, implicit $exec
15 %5:sreg_32 = COPY %4:vgpr_32
16 %6:sreg_32 = S_ADD_I32 %2:sreg_32, %5:sreg_32, implicit-def $scc
17 %7:sreg_32 = S_ADDC_U32 %3:sreg_32, %1:sreg_32, implicit-def $scc, implicit $scc
20 # Test to ensure i1 phi copies from scalar registers through another phi won't
21 # be promoted into vector ones.
22 # GCN-LABEL: name: fix-sgpr-i1-phi-copies
24 # GCN-NOT: vreg_64 = PHI
26 name: fix-sgpr-i1-phi-copies
27 tracksRegLiveness: true
33 S_CBRANCH_SCC1 %bb.6, implicit undef $scc
36 %3:vreg_1 = IMPLICIT_DEF
39 %4:vreg_1 = PHI %2:sreg_64, %bb.4, %3:vreg_1, %bb.5
42 %5:vreg_1 = PHI %2:sreg_64, %bb.3, %4:vreg_1, %bb.6
46 S_CBRANCH_SCC1 %bb.2, implicit undef $scc
49 %0:sreg_64 = S_MOV_B64 0
53 %1:sreg_64 = S_MOV_B64 -1
57 %2:sreg_64 = PHI %0:sreg_64, %bb.1, %1:sreg_64, %bb.2
58 S_CBRANCH_SCC1 %bb.7, implicit undef $scc