1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=FAST %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GREEDY %s
6 name: phi_s1_scc_scc_sbranch
8 tracksRegLiveness: true
11 ; FAST-LABEL: name: phi_s1_scc_scc_sbranch
13 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
14 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
15 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
18 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
19 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
20 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
21 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
24 ; FAST: successors: %bb.2(0x80000000)
25 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
28 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
29 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
30 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
31 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
32 ; GREEDY-LABEL: name: phi_s1_scc_scc_sbranch
34 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
35 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
36 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
37 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
38 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
39 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
40 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
41 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
42 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
45 ; GREEDY: successors: %bb.2(0x80000000)
46 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
49 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
50 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
51 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
52 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
53 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
54 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
56 successors: %bb.1, %bb.2
57 liveins: $sgpr0, $sgpr1, $sgpr2
59 %0:_(s32) = COPY $sgpr0
60 %1:_(s32) = COPY $sgpr1
61 %2:_(s32) = COPY $sgpr2
62 %3:_(s32) = G_CONSTANT i32 0
63 %4:_(s1) = G_ICMP intpred(eq), %0, %3
64 %5:_(s1) = G_ICMP intpred(eq), %2, %3
71 %6:_(s1) = G_ICMP intpred(eq), %1, %3
75 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
76 %8:_(s32) = G_SELECT %7, %3, %0
77 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
82 name: phi_s1_scc_scc_scc_sbranch
84 tracksRegLiveness: true
87 ; FAST-LABEL: name: phi_s1_scc_scc_scc_sbranch
89 ; FAST: successors: %bb.1(0x40000000), %bb.3(0x40000000)
90 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
91 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
92 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
93 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
94 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
95 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
96 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
97 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
98 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.3
101 ; FAST: successors: %bb.2(0x40000000), %bb.3(0x40000000)
102 ; FAST: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
103 ; FAST: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
104 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
105 ; FAST: [[ICMP3:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
106 ; FAST: G_BRCOND [[ICMP3]](s1), %bb.3
109 ; FAST: successors: %bb.3(0x80000000)
110 ; FAST: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
111 ; FAST: [[ICMP4:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
114 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1, [[ICMP4]](s1), %bb.2
115 ; FAST: [[COPY4:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
116 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY]], [[COPY1]]
117 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
118 ; GREEDY-LABEL: name: phi_s1_scc_scc_scc_sbranch
120 ; GREEDY: successors: %bb.1(0x40000000), %bb.3(0x40000000)
121 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
122 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
123 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
124 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
125 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
126 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
127 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
128 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
129 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.3
132 ; GREEDY: successors: %bb.2(0x40000000), %bb.3(0x40000000)
133 ; GREEDY: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
134 ; GREEDY: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
135 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
136 ; GREEDY: [[ICMP3:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
137 ; GREEDY: G_BRCOND [[ICMP3]](s1), %bb.3
140 ; GREEDY: successors: %bb.3(0x80000000)
141 ; GREEDY: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
142 ; GREEDY: [[ICMP4:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
145 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1, [[ICMP4]](s1), %bb.2
146 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
147 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
148 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
149 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY6]]
150 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
152 successors: %bb.1, %bb.3
153 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
155 %0:_(s32) = COPY $sgpr0
156 %1:_(s32) = COPY $sgpr1
157 %2:_(s32) = COPY $sgpr2
158 %3:_(s32) = COPY $sgpr3
159 %4:_(s32) = G_CONSTANT i32 0
160 %5:_(s1) = G_ICMP intpred(eq), %0, %3
161 %6:_(s1) = G_ICMP intpred(eq), %2, %3
166 successors: %bb.2, %bb.3
168 %7:_(s32) = G_CONSTANT i32 99
169 %8:_(s32) = G_CONSTANT i32 888
170 %9:_(s1) = G_ICMP intpred(eq), %1, %7
171 %10:_(s1) = G_ICMP intpred(eq), %1, %8
178 %11:_(s32) = G_CONSTANT i32 123
179 %12:_(s1) = G_ICMP intpred(eq), %2, %11
183 %13:_(s1) = G_PHI %5, %bb.0, %9, %bb.1, %12, %bb.2
184 %14:_(s32) = G_SELECT %13, %0, %1
185 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %14
190 name: phi_s1_scc_vcc_sbranch
192 tracksRegLiveness: true
195 ; FAST-LABEL: name: phi_s1_scc_vcc_sbranch
197 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
198 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
199 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
200 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
201 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
202 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
203 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
204 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
205 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
208 ; FAST: successors: %bb.2(0x80000000)
209 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
212 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
213 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
214 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
215 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
216 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
217 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
218 ; GREEDY-LABEL: name: phi_s1_scc_vcc_sbranch
220 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
221 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
222 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
223 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
224 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
225 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
226 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
227 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
228 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
231 ; GREEDY: successors: %bb.2(0x80000000)
232 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
235 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
236 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
237 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
238 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
239 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
240 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
242 successors: %bb.1, %bb.2
243 liveins: $sgpr0, $sgpr1, $vgpr0
245 %0:_(s32) = COPY $sgpr0
246 %1:_(s32) = COPY $vgpr0
247 %2:_(s32) = COPY $sgpr1
248 %3:_(s32) = G_CONSTANT i32 0
249 %4:_(s1) = G_ICMP intpred(eq), %0, %3
250 %5:_(s1) = G_ICMP intpred(eq), %2, %3
257 %6:_(s1) = G_ICMP intpred(eq), %1, %3
261 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
262 %8:_(s32) = G_SELECT %7, %3, %0
263 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
268 name: phi_s1_vcc_scc_sbranch
270 tracksRegLiveness: true
273 ; FAST-LABEL: name: phi_s1_vcc_scc_sbranch
275 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
276 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
277 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
278 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
279 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
280 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
281 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
282 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
283 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
286 ; FAST: successors: %bb.2(0x80000000)
287 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
290 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
291 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
292 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY1]]
293 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
294 ; GREEDY-LABEL: name: phi_s1_vcc_scc_sbranch
296 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
297 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
298 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
299 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
300 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
301 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
302 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
303 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
304 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
307 ; GREEDY: successors: %bb.2(0x80000000)
308 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
311 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
312 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
313 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
314 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
315 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
316 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
318 successors: %bb.1, %bb.2
319 liveins: $vgpr0, $sgpr0, $sgpr1
321 %0:_(s32) = COPY $vgpr0
322 %1:_(s32) = COPY $sgpr0
323 %2:_(s32) = COPY $sgpr1
324 %3:_(s32) = G_CONSTANT i32 0
325 %4:_(s1) = G_ICMP intpred(eq), %0, %3
326 %5:_(s1) = G_ICMP intpred(eq), %2, %3
333 %6:_(s1) = G_ICMP intpred(eq), %1, %3
337 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
338 %8:_(s32) = G_SELECT %7, %3, %1
339 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
344 name: phi_s1_vcc_vcc_sbranch
346 tracksRegLiveness: true
349 ; FAST-LABEL: name: phi_s1_vcc_vcc_sbranch
351 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
352 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
353 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
354 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
355 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
356 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
357 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
358 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
359 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
362 ; FAST: successors: %bb.2(0x80000000)
363 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
366 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
367 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
368 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY3]], [[COPY]]
369 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
370 ; GREEDY-LABEL: name: phi_s1_vcc_vcc_sbranch
372 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
373 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
374 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
375 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
376 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
377 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
378 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
379 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
380 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
383 ; GREEDY: successors: %bb.2(0x80000000)
384 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
387 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
388 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
389 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY3]], [[COPY]]
390 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
392 successors: %bb.1, %bb.2
393 liveins: $vgpr0, $vgpr1, $sgpr0
395 %0:_(s32) = COPY $vgpr0
396 %1:_(s32) = COPY $vgpr1
397 %2:_(s32) = COPY $sgpr0
398 %3:_(s32) = G_CONSTANT i32 0
399 %4:_(s1) = G_ICMP intpred(eq), %0, %3
400 %5:_(s1) = G_ICMP intpred(eq), %2, %3
407 %6:_(s1) = G_ICMP intpred(eq), %1, %3
411 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
412 %8:_(s32) = G_SELECT %7, %3, %0
413 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
418 name: phi_s1_s_scc_sbranch
420 tracksRegLiveness: true
423 ; FAST-LABEL: name: phi_s1_s_scc_sbranch
425 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
426 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
427 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
428 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
429 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
430 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
431 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
432 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
433 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
436 ; FAST: successors: %bb.2(0x80000000)
437 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
440 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
441 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
442 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
443 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
444 ; GREEDY-LABEL: name: phi_s1_s_scc_sbranch
446 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
447 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
448 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
449 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
450 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
451 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
452 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
453 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
454 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
457 ; GREEDY: successors: %bb.2(0x80000000)
458 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
461 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
462 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
463 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
464 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
465 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
466 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
468 successors: %bb.1, %bb.2
469 liveins: $sgpr0, $sgpr1, $sgpr2
471 %0:_(s32) = COPY $sgpr0
472 %1:_(s32) = COPY $sgpr1
473 %2:_(s32) = COPY $sgpr2
474 %3:_(s32) = G_CONSTANT i32 0
475 %4:_(s1) = G_TRUNC %0
476 %5:_(s1) = G_ICMP intpred(eq), %2, %3
483 %6:_(s1) = G_ICMP intpred(eq), %1, %3
487 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
488 %8:_(s32) = G_SELECT %7, %3, %0
489 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
494 name: phi_s1_scc_s_sbranch
496 tracksRegLiveness: true
499 ; FAST-LABEL: name: phi_s1_scc_s_sbranch
501 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
502 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
503 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
504 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
505 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
506 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
507 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
508 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
509 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
512 ; FAST: successors: %bb.2(0x80000000)
513 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
516 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
517 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
518 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
519 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
520 ; GREEDY-LABEL: name: phi_s1_scc_s_sbranch
522 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
523 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
524 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
525 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
526 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
527 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
528 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
529 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
530 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
533 ; GREEDY: successors: %bb.2(0x80000000)
534 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
537 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
538 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
539 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
540 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
541 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
542 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
544 successors: %bb.1, %bb.2
545 liveins: $sgpr0, $sgpr1, $sgpr2
547 %0:_(s32) = COPY $sgpr0
548 %1:_(s32) = COPY $sgpr1
549 %2:_(s32) = COPY $sgpr2
550 %3:_(s32) = G_CONSTANT i32 0
551 %4:_(s1) = G_ICMP intpred(eq), %0, %3
552 %5:_(s1) = G_ICMP intpred(eq), %2, %3
559 %6:_(s1) = G_TRUNC %1
563 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
564 %8:_(s32) = G_SELECT %7, %3, %0
565 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
570 name: phi_s1_scc_v_sbranch
572 tracksRegLiveness: true
575 ; FAST-LABEL: name: phi_s1_scc_v_sbranch
577 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
578 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
579 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
580 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
581 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
582 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
583 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
584 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
585 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
588 ; FAST: successors: %bb.2(0x80000000)
589 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
592 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
593 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
594 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
595 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
596 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
597 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
598 ; GREEDY-LABEL: name: phi_s1_scc_v_sbranch
600 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
601 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
602 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
603 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
604 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
605 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
606 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
607 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
608 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
611 ; GREEDY: successors: %bb.2(0x80000000)
612 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
615 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
616 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
617 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
618 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
619 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
620 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
622 successors: %bb.1, %bb.2
623 liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
625 %0:_(s32) = COPY $sgpr0
626 %1:_(s32) = COPY $vgpr0
627 %2:_(s32) = COPY $sgpr2
628 %3:_(s32) = G_CONSTANT i32 0
629 %4:_(s1) = G_ICMP intpred(eq), %0, %3
630 %5:_(s1) = G_ICMP intpred(eq), %2, %3
637 %6:_(s1) = G_TRUNC %1
641 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
642 %8:_(s32) = G_SELECT %7, %3, %0
643 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
648 name: phi_s1_v_scc_sbranch
650 tracksRegLiveness: true
653 ; FAST-LABEL: name: phi_s1_v_scc_sbranch
655 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
656 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
657 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
658 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
659 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
660 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
661 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
662 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
663 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
666 ; FAST: successors: %bb.2(0x80000000)
667 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
670 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
671 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
672 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
673 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
674 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
675 ; GREEDY-LABEL: name: phi_s1_v_scc_sbranch
677 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
678 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
679 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
680 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
681 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
682 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
683 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
684 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
685 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
688 ; GREEDY: successors: %bb.2(0x80000000)
689 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
692 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
693 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
694 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
695 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
696 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
698 successors: %bb.1, %bb.2
699 liveins: $vgpr0, $sgpr0, $sgpr1
701 %0:_(s32) = COPY $vgpr0
702 %1:_(s32) = COPY $sgpr0
703 %2:_(s32) = COPY $sgpr1
704 %3:_(s32) = G_CONSTANT i32 0
705 %4:_(s1) = G_TRUNC %0
706 %5:_(s1) = G_ICMP intpred(eq), %2, %3
713 %6:_(s1) = G_ICMP intpred(eq), %1, %3
717 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
718 %8:_(s32) = G_SELECT %7, %3, %0
719 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
724 name: phi_s1_vcc_s_sbranch
726 tracksRegLiveness: true
729 ; FAST-LABEL: name: phi_s1_vcc_s_sbranch
731 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
732 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
733 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
734 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
735 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
736 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
737 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
738 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
739 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
742 ; FAST: successors: %bb.2(0x80000000)
743 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
746 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
747 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
748 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
749 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
750 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
751 ; GREEDY-LABEL: name: phi_s1_vcc_s_sbranch
753 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
754 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
755 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
756 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
757 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
758 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
759 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
760 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
761 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
764 ; GREEDY: successors: %bb.2(0x80000000)
765 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
768 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
769 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
770 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
771 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
772 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
774 successors: %bb.1, %bb.2
775 liveins: $vgpr0, $sgpr0, $sgpr1
777 %0:_(s32) = COPY $vgpr0
778 %1:_(s32) = COPY $sgpr0
779 %2:_(s32) = COPY $sgpr1
780 %3:_(s32) = G_CONSTANT i32 0
781 %4:_(s1) = G_ICMP intpred(eq), %0, %3
782 %5:_(s1) = G_ICMP intpred(eq), %2, %3
789 %6:_(s1) = G_TRUNC %1
793 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
794 %8:_(s32) = G_SELECT %7, %3, %0
795 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
800 name: phi_s1_s_vcc_sbranch
802 tracksRegLiveness: true
805 ; FAST-LABEL: name: phi_s1_s_vcc_sbranch
807 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
808 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
809 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
810 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
811 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
812 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
813 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
814 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
815 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
818 ; FAST: successors: %bb.2(0x80000000)
819 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
822 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
823 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
824 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
825 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
826 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
827 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
828 ; GREEDY-LABEL: name: phi_s1_s_vcc_sbranch
830 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
831 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
832 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
833 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
834 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
835 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
836 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
837 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
838 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
841 ; GREEDY: successors: %bb.2(0x80000000)
842 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
845 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
846 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
847 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
848 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
849 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
850 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
852 successors: %bb.1, %bb.2
853 liveins: $vgpr0, $sgpr0, $sgpr1
855 %0:_(s32) = COPY $sgpr0
856 %1:_(s32) = COPY $vgpr0
857 %2:_(s32) = COPY $sgpr1
858 %3:_(s32) = G_CONSTANT i32 0
859 %4:_(s1) = G_TRUNC %0
860 %5:_(s1) = G_ICMP intpred(eq), %2, %3
867 %6:_(s1) = G_ICMP intpred(eq), %1, %3
871 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
872 %8:_(s32) = G_SELECT %7, %3, %0
873 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
878 name: phi_s1_vcc_v_sbranch
880 tracksRegLiveness: true
883 ; FAST-LABEL: name: phi_s1_vcc_v_sbranch
885 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
886 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
887 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
888 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
889 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
890 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
891 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
892 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
893 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
896 ; FAST: successors: %bb.2(0x80000000)
897 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
900 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
901 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
902 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
903 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
904 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
905 ; GREEDY-LABEL: name: phi_s1_vcc_v_sbranch
907 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
908 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
909 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
910 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
911 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
912 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
913 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
914 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
915 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
918 ; GREEDY: successors: %bb.2(0x80000000)
919 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
922 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
923 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
924 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
925 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
926 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
928 successors: %bb.1, %bb.2
929 liveins: $vgpr0, $vgpr1, $sgpr0
931 %0:_(s32) = COPY $vgpr0
932 %1:_(s32) = COPY $vgpr1
933 %2:_(s32) = COPY $sgpr0
934 %3:_(s32) = G_CONSTANT i32 0
935 %4:_(s1) = G_ICMP intpred(eq), %0, %3
936 %5:_(s1) = G_ICMP intpred(eq), %2, %3
943 %6:_(s1) = G_TRUNC %1
947 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
948 %8:_(s32) = G_SELECT %7, %3, %0
949 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
954 name: phi_s1_v_vcc_sbranch
956 tracksRegLiveness: true
959 ; FAST-LABEL: name: phi_s1_v_vcc_sbranch
961 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
962 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
963 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
964 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
965 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
966 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
967 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
968 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
969 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
972 ; FAST: successors: %bb.2(0x80000000)
973 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
976 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
977 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
978 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
979 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
980 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
981 ; GREEDY-LABEL: name: phi_s1_v_vcc_sbranch
983 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
984 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
985 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
986 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
987 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
988 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
989 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
990 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
991 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
994 ; GREEDY: successors: %bb.2(0x80000000)
995 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
998 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
999 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1000 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1001 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1002 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1004 successors: %bb.1, %bb.2
1005 liveins: $vgpr0, $vgpr1, $sgpr0
1007 %0:_(s32) = COPY $vgpr0
1008 %1:_(s32) = COPY $vgpr1
1009 %2:_(s32) = COPY $sgpr0
1010 %3:_(s32) = G_CONSTANT i32 0
1011 %4:_(s1) = G_TRUNC %0
1012 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1019 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1023 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1024 %8:_(s32) = G_SELECT %7, %3, %0
1025 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1030 name: phi_s1_v_s_sbranch
1032 tracksRegLiveness: true
1035 ; FAST-LABEL: name: phi_s1_v_s_sbranch
1037 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1038 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1039 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1040 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1041 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1042 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1043 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1044 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1045 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1048 ; FAST: successors: %bb.2(0x80000000)
1049 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1052 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1053 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1054 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1055 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1056 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1057 ; GREEDY-LABEL: name: phi_s1_v_s_sbranch
1059 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1060 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1061 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1062 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1063 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1064 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1065 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1066 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1067 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1068 ; GREEDY: G_BR %bb.2
1070 ; GREEDY: successors: %bb.2(0x80000000)
1071 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1072 ; GREEDY: G_BR %bb.2
1074 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1075 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1076 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1077 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1078 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1080 successors: %bb.1, %bb.2
1081 liveins: $vgpr0, $sgpr0, $sgpr1
1083 %0:_(s32) = COPY $vgpr0
1084 %1:_(s32) = COPY $sgpr0
1085 %2:_(s32) = COPY $sgpr1
1086 %3:_(s32) = G_CONSTANT i32 0
1087 %4:_(s1) = G_TRUNC %0
1088 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1095 %6:_(s1) = G_TRUNC %1
1099 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1100 %8:_(s32) = G_SELECT %7, %3, %0
1101 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1106 name: phi_s1_s_v_sbranch
1108 tracksRegLiveness: true
1111 ; FAST-LABEL: name: phi_s1_s_v_sbranch
1113 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1114 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1115 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1116 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1117 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1118 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1119 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1120 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1121 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1124 ; FAST: successors: %bb.2(0x80000000)
1125 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1128 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1129 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1130 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1131 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1132 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1133 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1134 ; GREEDY-LABEL: name: phi_s1_s_v_sbranch
1136 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1137 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1138 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1139 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1140 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1141 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1142 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1143 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1144 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1145 ; GREEDY: G_BR %bb.2
1147 ; GREEDY: successors: %bb.2(0x80000000)
1148 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1149 ; GREEDY: G_BR %bb.2
1151 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1152 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1153 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1154 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1155 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1156 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1158 successors: %bb.1, %bb.2
1159 liveins: $vgpr0, $sgpr0, $sgpr1
1161 %0:_(s32) = COPY $sgpr0
1162 %1:_(s32) = COPY $vgpr0
1163 %2:_(s32) = COPY $sgpr1
1164 %3:_(s32) = G_CONSTANT i32 0
1165 %4:_(s1) = G_TRUNC %0
1166 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1173 %6:_(s1) = G_TRUNC %1
1177 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1178 %8:_(s32) = G_SELECT %7, %3, %0
1179 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1184 name: phi_s1_v_v_sbranch
1186 tracksRegLiveness: true
1189 ; FAST-LABEL: name: phi_s1_v_v_sbranch
1191 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1192 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1193 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1194 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1195 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1196 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1197 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1198 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1199 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1202 ; FAST: successors: %bb.2(0x80000000)
1203 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1206 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1207 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1208 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1209 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1210 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1211 ; GREEDY-LABEL: name: phi_s1_v_v_sbranch
1213 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1214 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1215 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1216 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1217 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1218 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1219 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1220 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1221 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1222 ; GREEDY: G_BR %bb.2
1224 ; GREEDY: successors: %bb.2(0x80000000)
1225 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1226 ; GREEDY: G_BR %bb.2
1228 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1229 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1230 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1231 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1232 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1234 successors: %bb.1, %bb.2
1235 liveins: $vgpr0, $vgpr1, $sgpr0
1237 %0:_(s32) = COPY $vgpr0
1238 %1:_(s32) = COPY $vgpr1
1239 %2:_(s32) = COPY $sgpr0
1240 %3:_(s32) = G_CONSTANT i32 0
1241 %4:_(s1) = G_TRUNC %0
1242 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1249 %6:_(s1) = G_TRUNC %1
1253 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1254 %8:_(s32) = G_SELECT %7, %3, %0
1255 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1260 name: phi_s1_s_s_sbranch
1262 tracksRegLiveness: true
1265 ; FAST-LABEL: name: phi_s1_s_s_sbranch
1267 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1268 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1269 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1270 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1271 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1272 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1273 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1274 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1275 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1278 ; FAST: successors: %bb.2(0x80000000)
1279 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1282 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1283 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
1284 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
1285 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1286 ; GREEDY-LABEL: name: phi_s1_s_s_sbranch
1288 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1289 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1290 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1291 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1292 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1293 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1294 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1295 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1296 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1297 ; GREEDY: G_BR %bb.2
1299 ; GREEDY: successors: %bb.2(0x80000000)
1300 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1301 ; GREEDY: G_BR %bb.2
1303 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1304 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1305 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1306 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1307 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1308 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1310 successors: %bb.1, %bb.2
1311 liveins: $sgpr0, $sgpr1, $sgpr2
1313 %0:_(s32) = COPY $sgpr0
1314 %1:_(s32) = COPY $sgpr1
1315 %2:_(s32) = COPY $sgpr2
1316 %3:_(s32) = G_CONSTANT i32 0
1317 %4:_(s1) = G_TRUNC %0
1318 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1325 %6:_(s1) = G_TRUNC %1
1329 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1330 %8:_(s32) = G_SELECT %7, %3, %0
1331 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8