1 # RUN: llc -march=amdgcn -run-pass simple-register-coalescing -o - %s | FileCheck --check-prefix=GCN %s
4 # This test will provoke a Couldn't join subrange unreachable without the
5 # fix for http://llvm.org/PR35373
7 # GCN: S_CBRANCH_SCC1 %bb.6, implicit undef $scc
10 define amdgpu_ps void @regcoal-subrange-join-seg() local_unnamed_addr #0 {
15 name: regcoal-subrange-join-seg
16 tracksRegLiveness: true
18 - { id: 0, class: sgpr_128 }
19 - { id: 1, class: sgpr_128 }
20 - { id: 2, class: sgpr_128 }
21 - { id: 3, class: sgpr_128 }
22 - { id: 4, class: sgpr_128 }
23 - { id: 5, class: sgpr_128 }
24 - { id: 6, class: sgpr_128 }
25 - { id: 7, class: sgpr_128 }
26 - { id: 8, class: sgpr_128 }
27 - { id: 9, class: sreg_32_xm0 }
28 - { id: 10, class: sreg_32_xm0 }
29 - { id: 11, class: vgpr_32 }
30 - { id: 12, class: vgpr_32 }
31 - { id: 13, class: vgpr_32 }
32 - { id: 14, class: sreg_32_xm0_xexec }
33 - { id: 15, class: sgpr_128 }
34 - { id: 16, class: sreg_32 }
35 - { id: 17, class: sreg_32_xm0 }
36 - { id: 18, class: sreg_32_xm0 }
37 - { id: 19, class: sreg_32_xm0 }
38 - { id: 20, class: sreg_32_xm0 }
39 - { id: 21, class: sreg_32_xm0_xexec }
40 - { id: 22, class: sgpr_128 }
41 - { id: 23, class: sreg_32_xm0 }
42 - { id: 24, class: vgpr_32 }
43 - { id: 25, class: sreg_64_xexec }
44 - { id: 26, class: vgpr_32 }
45 - { id: 27, class: sreg_32_xm0 }
46 - { id: 28, class: sreg_32 }
47 - { id: 29, class: sgpr_128 }
48 - { id: 30, class: sreg_32_xm0 }
49 - { id: 31, class: sreg_32_xm0 }
50 - { id: 32, class: vgpr_32 }
51 - { id: 33, class: vgpr_32 }
52 - { id: 34, class: vgpr_32 }
53 - { id: 35, class: vgpr_32 }
54 - { id: 36, class: vgpr_32 }
55 - { id: 37, class: vgpr_32 }
56 - { id: 38, class: vgpr_32 }
57 - { id: 39, class: vgpr_32 }
58 - { id: 40, class: vgpr_32 }
59 - { id: 41, class: vgpr_32 }
60 - { id: 42, class: vgpr_32 }
61 - { id: 43, class: vgpr_32 }
62 - { id: 44, class: vgpr_32 }
63 - { id: 45, class: vgpr_32 }
64 - { id: 46, class: vgpr_32 }
65 - { id: 47, class: vgpr_32 }
66 - { id: 48, class: vgpr_32 }
67 - { id: 49, class: vreg_128 }
68 - { id: 50, class: vreg_128 }
69 - { id: 51, class: vreg_128 }
70 - { id: 52, class: vreg_128 }
71 - { id: 53, class: vreg_128 }
72 - { id: 54, class: vreg_128 }
73 - { id: 55, class: vgpr_32 }
74 - { id: 56, class: vreg_128 }
75 - { id: 57, class: vreg_128 }
76 - { id: 58, class: vreg_128 }
77 - { id: 59, class: vreg_128 }
78 - { id: 60, class: vreg_128 }
79 - { id: 61, class: vreg_128 }
80 - { id: 62, class: vreg_128 }
81 - { id: 63, class: vreg_128 }
84 S_CBRANCH_SCC1 %bb.6, implicit undef $scc
88 S_CBRANCH_SCC1 %bb.4, implicit undef $scc
92 S_CBRANCH_SCC1 %bb.4, implicit undef $scc
98 successors: %bb.5, %bb.6
100 S_CBRANCH_SCC1 %bb.6, implicit undef $scc
106 S_CBRANCH_SCC1 %bb.14, implicit undef $scc
110 S_CBRANCH_SCC1 %bb.9, implicit undef $scc
116 successors: %bb.10, %bb.13
118 S_CBRANCH_SCC1 %bb.13, implicit undef $scc
122 S_CBRANCH_SCC1 %bb.12, implicit undef $scc
132 S_CBRANCH_SCC1 %bb.26, implicit undef $scc
136 S_CBRANCH_SCC1 %bb.20, implicit undef $scc
140 successors: %bb.17, %bb.19
142 S_CBRANCH_SCC1 %bb.19, implicit undef $scc
146 successors: %bb.18, %bb.19
148 S_CBRANCH_SCC1 %bb.19, implicit undef $scc
156 S_CBRANCH_SCC1 %bb.25, implicit undef $scc
160 successors: %bb.22, %bb.24
162 S_CBRANCH_SCC1 %bb.24, implicit undef $scc
166 successors: %bb.23, %bb.24
168 S_CBRANCH_SCC1 %bb.24, implicit undef $scc
178 S_CBRANCH_SCC1 %bb.35, implicit undef $scc
182 S_CBRANCH_SCC1 %bb.32, implicit undef $scc
186 %9 = S_FF1_I32_B32 undef %10
187 %13 = V_MAD_U32_U24 killed %9, 48, 32, 0, implicit $exec
188 %45 = BUFFER_LOAD_DWORD_OFFEN killed %13, undef %15, 0, 0, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable invariant load 4)
189 %46 = V_AND_B32_e32 1, killed %45, implicit $exec
190 %21 = S_BUFFER_LOAD_DWORD_SGPR undef %22, undef %23, 0, 0 :: (dereferenceable invariant load 4)
191 %25 = V_CMP_GE_F32_e64 0, 0, 0, killed %21, 0, implicit $exec
192 %26 = V_CNDMASK_B32_e64 0, 0, 0, -1, killed %25, implicit $exec
196 successors: %bb.30(0x30000000), %bb.36(0x50000000)
198 %53 = COPY killed %62
199 %47 = V_ADD_I32_e32 -1, %46, implicit-def dead $vcc, implicit $exec
200 %48 = V_OR_B32_e32 killed %47, %26, implicit $exec
202 %49.sub2 = COPY undef %48
203 %51 = COPY killed %49
204 %51.sub3 = COPY undef %26
205 V_CMP_NE_U32_e32 0, killed %48, implicit-def $vcc, implicit $exec
206 $vcc = S_AND_B64 $exec, killed $vcc, implicit-def dead $scc
207 S_CBRANCH_VCCZ %bb.30, implicit killed $vcc
210 %63 = COPY killed %51
214 %33 = V_MAD_F32 1, killed %53.sub0, 0, undef %34, 0, 0, 0, 0, implicit $exec
215 %35 = V_MAC_F32_e32 killed %33, undef %36, undef %35, implicit $exec
216 %38 = V_MAX_F32_e32 0, killed %35, implicit $exec
217 %39 = V_LOG_F32_e32 killed %38, implicit $exec
218 %40 = V_MUL_F32_e32 killed %39, undef %41, implicit $exec
219 %42 = V_EXP_F32_e32 killed %40, implicit $exec
220 dead %43 = V_MUL_F32_e32 killed %42, undef %44, implicit $exec
221 %63 = COPY killed %51
224 %52 = COPY killed %63
225 %62 = COPY killed %52
229 S_CBRANCH_SCC1 %bb.34, implicit undef $scc