1 # RUN: llc -mtriple=amdgcn -mcpu=gfx803 -run-pass register-coalescer -verify-machineinstrs -o - %s | FileCheck --check-prefix=GCN %s
3 # This test gave "Use not jointly dominated by defs" when
4 # removePartialRedundancy attempted to prune and then re-extend a subrange.
10 tracksRegLiveness: true
13 successors: %bb.1, %bb.2
15 %21:vgpr_32 = nofpexcept V_TRUNC_F32_e32 undef %22:vgpr_32, implicit $mode, implicit $exec
16 %23:vgpr_32 = nofpexcept V_CVT_U32_F32_e32 killed %21, implicit $mode, implicit $exec
17 %108:vgpr_32 = V_LSHRREV_B32_e32 4, killed %23, implicit $exec
18 undef %109.sub1:vreg_128 = COPY %108
19 %28:sreg_32_xm0_xexec = S_BUFFER_LOAD_DWORD_IMM undef %29:sgpr_128, 3044, 0 :: (dereferenceable invariant load (s32))
20 S_CMP_EQ_U32 killed %28, 0, implicit-def $scc
21 S_CBRANCH_SCC0 %bb.2, implicit killed $scc
24 %138:vreg_128 = COPY killed %109
28 successors: %bb.3, %bb.4
30 S_CBRANCH_SCC0 %bb.4, implicit undef $scc
33 %136:vreg_128 = COPY killed %109
37 %136:vreg_128 = COPY killed %109
40 successors: %bb.6, %bb.8
42 %110:vreg_128 = COPY killed %136
43 dead %32:sreg_32_xm0 = S_MOV_B32 0
44 %111:vreg_128 = COPY %110
45 %111.sub3:vreg_128 = COPY undef %32
46 S_CBRANCH_SCC1 %bb.8, implicit undef $scc
50 %36:sreg_32_xm0_xexec = S_BUFFER_LOAD_DWORD_IMM undef %37:sgpr_128, 2708, 0 :: (dereferenceable invariant load (s32))
51 %39:vgpr_32 = nnan arcp contract reassoc nofpexcept V_MAD_F32_e64 0, killed %110.sub1, 0, target-flags(amdgpu-gotprel32-lo) 0, 0, 0, 0, 0, implicit $mode, implicit $exec
52 %40:vgpr_32 = nofpexcept V_MAD_F32_e64 0, %111.sub1, 0, target-flags(amdgpu-gotprel32-lo) 0, 0, 0, 0, 0, implicit $mode, implicit $exec
53 %41:vgpr_32 = nofpexcept V_MUL_F32_e64 0, 0, 0, killed %40, 1, 0, implicit $mode, implicit $exec
54 %43:vgpr_32 = nofpexcept V_MUL_F32_e32 0, %39, implicit $mode, implicit $exec
55 %44:vgpr_32 = COPY killed %43
56 %44:vgpr_32 = nofpexcept V_MAC_F32_e32 0, killed %41, %44, implicit $mode, implicit $exec
57 %47:vgpr_32 = V_MOV_B32_e32 2143289344, implicit $exec
58 %46:vgpr_32 = COPY killed %47
59 %46:vgpr_32 = nofpexcept V_MAC_F32_e32 0, killed %39, %46, implicit $mode, implicit $exec
60 undef %115.sub0:vreg_128 = COPY %46
61 %115.sub1:vreg_128 = COPY killed %46
62 %115.sub2:vreg_128 = COPY killed %44
63 %50:sreg_64_xexec = V_CMP_NE_U32_e64 0, killed %36, implicit $exec
64 dead %118:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
65 %137:vreg_128 = IMPLICIT_DEF
68 successors: %bb.7, %bb.8
70 %119:vreg_128 = COPY killed %137
71 %121:vreg_128 = COPY killed %119
72 %121.sub3:vreg_128 = COPY undef %32
73 %56:vgpr_32 = nofpexcept V_ADD_F32_e32 %115.sub2, %121.sub2, implicit $mode, implicit $exec
74 %59:vgpr_32 = nofpexcept V_ADD_F32_e32 %115.sub1, %121.sub1, implicit $mode, implicit $exec
75 %62:vgpr_32 = nofpexcept V_ADD_F32_e32 %115.sub0, killed %121.sub0, implicit $mode, implicit $exec
76 undef %117.sub0:vreg_128 = COPY killed %62
77 %117.sub1:vreg_128 = COPY killed %59
78 %117.sub2:vreg_128 = COPY killed %56
79 %64:sreg_64 = S_AND_B64 $exec, %50, implicit-def dead $scc
80 $vcc = COPY killed %64
81 %137:vreg_128 = COPY killed %117
82 S_CBRANCH_VCCNZ %bb.7, implicit killed $vcc
86 dead %66:sreg_32_xm0_xexec = S_BUFFER_LOAD_DWORD_IMM undef %67:sgpr_128, 2704, 0 :: (dereferenceable invariant load (s32))
87 %138:vreg_128 = COPY killed %111
90 %113:vreg_128 = COPY killed %138
91 S_CBRANCH_SCC1 %bb.18, implicit undef $scc
95 S_CBRANCH_SCC1 %bb.12, implicit undef $scc
101 successors: %bb.13, %bb.18
103 S_CBRANCH_SCC1 %bb.18, implicit undef $scc
107 successors: %bb.14, %bb.17
109 S_CBRANCH_SCC1 %bb.17, implicit undef $scc
113 S_CBRANCH_SCC1 %bb.16, implicit undef $scc
123 S_CBRANCH_SCC1 %bb.26, implicit undef $scc
127 S_CBRANCH_SCC1 %bb.26, implicit undef $scc
131 S_CBRANCH_SCC1 %bb.25, implicit undef $scc
135 successors: %bb.22, %bb.24
137 S_CBRANCH_SCC1 %bb.24, implicit undef $scc
141 successors: %bb.23, %bb.24
143 S_CBRANCH_SCC1 %bb.24, implicit undef $scc
153 S_CBRANCH_SCC1 %bb.33, implicit undef $scc
157 S_CBRANCH_SCC1 %bb.33, implicit undef $scc
161 dead %77:vgpr_32 = V_MOV_B32_e32 0, implicit $exec
162 %78:vgpr_32 = nnan arcp contract reassoc nofpexcept V_MAD_F32_e64 0, killed %113.sub1, 0, target-flags(amdgpu-gotprel32-lo) 0, 0, 1065353216, 0, 0, implicit $mode, implicit $exec
163 dead %80:sreg_32_xm0 = S_MOV_B32 0
164 dead %82:vgpr_32 = nofpexcept V_MUL_F32_e32 killed %78, %78, implicit $mode, implicit $exec
165 dead %126:vgpr_32 = V_MOV_B32_e32 2143289344, implicit $exec
166 dead %125:vreg_128 = IMPLICIT_DEF
167 dead %91:sreg_32_xm0 = S_MOV_B32 2143289344
168 %96:sreg_64 = S_AND_B64 $exec, 0, implicit-def dead $scc
169 %139:vreg_128 = IMPLICIT_DEF
172 successors: %bb.30, %bb.31
174 dead %127:vreg_128 = COPY killed %139
175 S_CBRANCH_SCC0 %bb.31, implicit undef $scc
181 successors: %bb.32, %bb.34
184 S_CBRANCH_VCCNZ %bb.34, implicit killed $vcc
188 dead %130:vreg_128 = IMPLICIT_DEF
189 dead %128:vreg_128 = COPY undef %130
190 %139:vreg_128 = IMPLICIT_DEF