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_s32_ss_sbranch
8 tracksRegLiveness: true
11 ; FAST-LABEL: name: phi_s32_ss_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), [[COPY2]](s32), [[C]]
20 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
23 ; FAST: successors: %bb.2(0x80000000)
24 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
27 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
28 ; FAST: $sgpr0 = COPY [[PHI]](s32)
29 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
30 ; GREEDY-LABEL: name: phi_s32_ss_sbranch
32 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
33 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
34 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
35 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
36 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
37 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
38 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
39 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
42 ; GREEDY: successors: %bb.2(0x80000000)
43 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
46 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
47 ; GREEDY: $sgpr0 = COPY [[PHI]](s32)
48 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
50 successors: %bb.1, %bb.2
51 liveins: $sgpr0, $sgpr1, $sgpr2
53 %0:_(s32) = COPY $sgpr0
54 %1:_(s32) = COPY $sgpr1
55 %2:_(s32) = COPY $sgpr2
56 %3:_(s32) = G_CONSTANT i32 0
57 %4:_(s1) = G_ICMP intpred(eq), %2, %3
68 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
70 S_SETPC_B64 undef $sgpr30_sgpr31
75 name: phi_s32_sv_sbranch
77 tracksRegLiveness: true
80 ; FAST-LABEL: name: phi_s32_sv_sbranch
82 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
83 ; FAST: liveins: $sgpr0, $vgpr0, $sgpr1
84 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
85 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
86 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
87 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
88 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
89 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
92 ; FAST: successors: %bb.2(0x80000000)
93 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
96 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
97 ; FAST: $vgpr0 = COPY [[PHI]](s32)
98 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
99 ; GREEDY-LABEL: name: phi_s32_sv_sbranch
101 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
102 ; GREEDY: liveins: $sgpr0, $vgpr0, $sgpr1
103 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
104 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
105 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
106 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
107 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
108 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
111 ; GREEDY: successors: %bb.2(0x80000000)
112 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
115 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
116 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
117 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
119 successors: %bb.1, %bb.2
120 liveins: $sgpr0, $vgpr0, $sgpr1
122 %0:_(s32) = COPY $sgpr0
123 %1:_(s32) = COPY $vgpr0
124 %2:_(s32) = COPY $sgpr1
125 %3:_(s32) = G_CONSTANT i32 0
126 %4:_(s1) = G_ICMP intpred(eq), %2, %3
137 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
139 S_SETPC_B64 undef $sgpr30_sgpr31
144 name: phi_s32_vs_sbranch
146 tracksRegLiveness: true
149 ; FAST-LABEL: name: phi_s32_vs_sbranch
151 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
152 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
153 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
154 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
155 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
156 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
157 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
158 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
161 ; FAST: successors: %bb.2(0x80000000)
162 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
165 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
166 ; FAST: $vgpr0 = COPY [[PHI]](s32)
167 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
168 ; GREEDY-LABEL: name: phi_s32_vs_sbranch
170 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
171 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
172 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
173 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
174 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
175 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
176 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
177 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
180 ; GREEDY: successors: %bb.2(0x80000000)
181 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
184 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
185 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
186 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
188 successors: %bb.1, %bb.2
189 liveins: $vgpr0, $sgpr0, $sgpr1
191 %0:_(s32) = COPY $vgpr0
192 %1:_(s32) = COPY $sgpr0
193 %2:_(s32) = COPY $sgpr1
194 %3:_(s32) = G_CONSTANT i32 0
195 %4:_(s1) = G_ICMP intpred(eq), %2, %3
206 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
208 S_SETPC_B64 undef $sgpr30_sgpr31
213 name: phi_s32_vv_sbranch
215 tracksRegLiveness: true
218 ; FAST-LABEL: name: phi_s32_vv_sbranch
220 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
221 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
222 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
223 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
224 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
225 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
226 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
227 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
230 ; FAST: successors: %bb.2(0x80000000)
231 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
234 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
235 ; FAST: $vgpr0 = COPY [[PHI]](s32)
236 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
237 ; GREEDY-LABEL: name: phi_s32_vv_sbranch
239 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
240 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
241 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
242 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
243 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
244 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
245 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
246 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
249 ; GREEDY: successors: %bb.2(0x80000000)
250 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
253 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
254 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
255 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
257 successors: %bb.1, %bb.2
258 liveins: $vgpr0, $vgpr1, $sgpr0
260 %0:_(s32) = COPY $vgpr0
261 %1:_(s32) = COPY $vgpr1
262 %2:_(s32) = COPY $sgpr0
263 %3:_(s32) = G_CONSTANT i32 0
264 %4:_(s1) = G_ICMP intpred(eq), %2, %3
275 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
277 S_SETPC_B64 undef $sgpr30_sgpr31
281 name: phi_s32_ss_vcc_sbranch
283 tracksRegLiveness: true
286 ; FAST-LABEL: name: phi_s32_ss_vcc_sbranch
288 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
289 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
290 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
291 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
292 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
293 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
294 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
295 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
298 ; FAST: successors: %bb.2(0x80000000)
299 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
302 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
303 ; FAST: $sgpr0 = COPY [[PHI]](s32)
304 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
305 ; GREEDY-LABEL: name: phi_s32_ss_vcc_sbranch
307 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
308 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
309 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
310 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
311 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
312 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
313 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
314 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
317 ; GREEDY: successors: %bb.2(0x80000000)
318 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
321 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
322 ; GREEDY: $sgpr0 = COPY [[PHI]](s32)
323 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
325 successors: %bb.1, %bb.2
326 liveins: $sgpr0, $sgpr1, $vgpr0
328 %0:_(s32) = COPY $sgpr0
329 %1:_(s32) = COPY $sgpr1
330 %2:_(s32) = COPY $vgpr0
331 %3:_(s32) = G_CONSTANT i32 0
332 %4:_(s1) = G_ICMP intpred(eq), %2, %3
343 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
345 S_SETPC_B64 undef $sgpr30_sgpr31
350 name: phi_s32_sv_vcc_sbranch
352 tracksRegLiveness: true
355 ; FAST-LABEL: name: phi_s32_sv_vcc_sbranch
357 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
358 ; FAST: liveins: $sgpr0, $vgpr0, $vgpr1
359 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
360 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
361 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
362 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
363 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
364 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
367 ; FAST: successors: %bb.2(0x80000000)
368 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
371 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
372 ; FAST: $vgpr0 = COPY [[PHI]](s32)
373 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
374 ; GREEDY-LABEL: name: phi_s32_sv_vcc_sbranch
376 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
377 ; GREEDY: liveins: $sgpr0, $vgpr0, $vgpr1
378 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
379 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
380 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
381 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
382 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
383 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
386 ; GREEDY: successors: %bb.2(0x80000000)
387 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
390 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
391 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
392 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
394 successors: %bb.1, %bb.2
395 liveins: $sgpr0, $vgpr0, $vgpr1
397 %0:_(s32) = COPY $sgpr0
398 %1:_(s32) = COPY $vgpr0
399 %2:_(s32) = COPY $vgpr1
400 %3:_(s32) = G_CONSTANT i32 0
401 %4:_(s1) = G_ICMP intpred(eq), %2, %3
412 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
414 S_SETPC_B64 undef $sgpr30_sgpr31
419 name: phi_s32_vs_vcc_sbranch
421 tracksRegLiveness: true
424 ; FAST-LABEL: name: phi_s32_vs_vcc_sbranch
426 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
427 ; FAST: liveins: $vgpr0, $sgpr0, $vgpr1
428 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
429 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
430 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
431 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
432 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
433 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
436 ; FAST: successors: %bb.2(0x80000000)
437 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
440 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
441 ; FAST: $vgpr0 = COPY [[PHI]](s32)
442 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
443 ; GREEDY-LABEL: name: phi_s32_vs_vcc_sbranch
445 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
446 ; GREEDY: liveins: $vgpr0, $sgpr0, $vgpr1
447 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
448 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
449 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
450 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
451 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
452 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
455 ; GREEDY: successors: %bb.2(0x80000000)
456 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
459 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
460 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
461 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
463 successors: %bb.1, %bb.2
464 liveins: $vgpr0, $sgpr0, $vgpr1
466 %0:_(s32) = COPY $vgpr0
467 %1:_(s32) = COPY $sgpr0
468 %2:_(s32) = COPY $vgpr1
469 %3:_(s32) = G_CONSTANT i32 0
470 %4:_(s1) = G_ICMP intpred(eq), %2, %3
481 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
483 S_SETPC_B64 undef $sgpr30_sgpr31
488 name: phi_s32_vv_vcc_sbranch
490 tracksRegLiveness: true
493 ; FAST-LABEL: name: phi_s32_vv_vcc_sbranch
495 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
496 ; FAST: liveins: $vgpr0, $vgpr1, $vgpr2
497 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
498 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
499 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
500 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
501 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
502 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
505 ; FAST: successors: %bb.2(0x80000000)
506 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
509 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
510 ; FAST: $vgpr0 = COPY [[PHI]](s32)
511 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
512 ; GREEDY-LABEL: name: phi_s32_vv_vcc_sbranch
514 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
515 ; GREEDY: liveins: $vgpr0, $vgpr1, $vgpr2
516 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
517 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
518 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
519 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
520 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
521 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
524 ; GREEDY: successors: %bb.2(0x80000000)
525 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
528 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
529 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
530 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
532 successors: %bb.1, %bb.2
533 liveins: $vgpr0, $vgpr1, $vgpr2
535 %0:_(s32) = COPY $vgpr0
536 %1:_(s32) = COPY $vgpr1
537 %2:_(s32) = COPY $vgpr2
538 %3:_(s32) = G_CONSTANT i32 0
539 %4:_(s1) = G_ICMP intpred(eq), %2, %3
550 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
552 S_SETPC_B64 undef $sgpr30_sgpr31
557 name: phi_s1_scc_scc_sbranch
559 tracksRegLiveness: true
562 ; FAST-LABEL: name: phi_s1_scc_scc_sbranch
564 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
565 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
566 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
567 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
568 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
569 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
570 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
571 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
572 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
575 ; FAST: successors: %bb.2(0x80000000)
576 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
579 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
580 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
581 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
582 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
583 ; GREEDY-LABEL: name: phi_s1_scc_scc_sbranch
585 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
586 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
587 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
588 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
589 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
590 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
591 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
592 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
593 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
596 ; GREEDY: successors: %bb.2(0x80000000)
597 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
600 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
601 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
602 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
603 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
604 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
605 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
607 successors: %bb.1, %bb.2
608 liveins: $sgpr0, $sgpr1, $sgpr2
610 %0:_(s32) = COPY $sgpr0
611 %1:_(s32) = COPY $sgpr1
612 %2:_(s32) = COPY $sgpr2
613 %3:_(s32) = G_CONSTANT i32 0
614 %4:_(s1) = G_ICMP intpred(eq), %0, %3
615 %5:_(s1) = G_ICMP intpred(eq), %2, %3
622 %6:_(s1) = G_ICMP intpred(eq), %1, %3
626 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
627 %8:_(s32) = G_SELECT %7, %3, %0
628 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
633 name: phi_s1_scc_scc_scc_sbranch
635 tracksRegLiveness: true
638 ; FAST-LABEL: name: phi_s1_scc_scc_scc_sbranch
640 ; FAST: successors: %bb.1(0x40000000), %bb.3(0x40000000)
641 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
642 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
643 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
644 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
645 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
646 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
647 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
648 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
649 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.3
652 ; FAST: successors: %bb.2(0x40000000), %bb.3(0x40000000)
653 ; FAST: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
654 ; FAST: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
655 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
656 ; FAST: [[ICMP3:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
657 ; FAST: G_BRCOND [[ICMP3]](s1), %bb.3
660 ; FAST: successors: %bb.3(0x80000000)
661 ; FAST: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
662 ; FAST: [[ICMP4:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
665 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1, [[ICMP4]](s1), %bb.2
666 ; FAST: [[COPY4:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
667 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY]], [[COPY1]]
668 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
669 ; GREEDY-LABEL: name: phi_s1_scc_scc_scc_sbranch
671 ; GREEDY: successors: %bb.1(0x40000000), %bb.3(0x40000000)
672 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
673 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
674 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
675 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
676 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
677 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
678 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
679 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
680 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.3
683 ; GREEDY: successors: %bb.2(0x40000000), %bb.3(0x40000000)
684 ; GREEDY: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
685 ; GREEDY: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
686 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
687 ; GREEDY: [[ICMP3:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
688 ; GREEDY: G_BRCOND [[ICMP3]](s1), %bb.3
691 ; GREEDY: successors: %bb.3(0x80000000)
692 ; GREEDY: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
693 ; GREEDY: [[ICMP4:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
696 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1, [[ICMP4]](s1), %bb.2
697 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
698 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
699 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
700 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY6]]
701 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
703 successors: %bb.1, %bb.3
704 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
706 %0:_(s32) = COPY $sgpr0
707 %1:_(s32) = COPY $sgpr1
708 %2:_(s32) = COPY $sgpr2
709 %3:_(s32) = COPY $sgpr3
710 %4:_(s32) = G_CONSTANT i32 0
711 %5:_(s1) = G_ICMP intpred(eq), %0, %3
712 %6:_(s1) = G_ICMP intpred(eq), %2, %3
717 successors: %bb.2, %bb.3
719 %7:_(s32) = G_CONSTANT i32 99
720 %8:_(s32) = G_CONSTANT i32 888
721 %9:_(s1) = G_ICMP intpred(eq), %1, %7
722 %10:_(s1) = G_ICMP intpred(eq), %1, %8
729 %11:_(s32) = G_CONSTANT i32 123
730 %12:_(s1) = G_ICMP intpred(eq), %2, %11
734 %13:_(s1) = G_PHI %5, %bb.0, %9, %bb.1, %12, %bb.2
735 %14:_(s32) = G_SELECT %13, %0, %1
736 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %14
741 name: phi_s1_scc_vcc_sbranch
743 tracksRegLiveness: true
746 ; FAST-LABEL: name: phi_s1_scc_vcc_sbranch
748 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
749 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
750 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
751 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
752 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
753 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
754 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
755 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
756 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
759 ; FAST: successors: %bb.2(0x80000000)
760 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
763 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
764 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
765 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
766 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
767 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
768 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
769 ; GREEDY-LABEL: name: phi_s1_scc_vcc_sbranch
771 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
772 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
773 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
774 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
775 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
776 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
777 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
778 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
779 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
782 ; GREEDY: successors: %bb.2(0x80000000)
783 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
786 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
787 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
788 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
789 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
790 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
791 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
793 successors: %bb.1, %bb.2
794 liveins: $sgpr0, $sgpr1, $vgpr0
796 %0:_(s32) = COPY $sgpr0
797 %1:_(s32) = COPY $vgpr0
798 %2:_(s32) = COPY $sgpr1
799 %3:_(s32) = G_CONSTANT i32 0
800 %4:_(s1) = G_ICMP intpred(eq), %0, %3
801 %5:_(s1) = G_ICMP intpred(eq), %2, %3
808 %6:_(s1) = G_ICMP intpred(eq), %1, %3
812 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
813 %8:_(s32) = G_SELECT %7, %3, %0
814 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
819 name: phi_s1_vcc_scc_sbranch
821 tracksRegLiveness: true
824 ; FAST-LABEL: name: phi_s1_vcc_scc_sbranch
826 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
827 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
828 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
829 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
830 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
831 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
832 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
833 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
834 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
837 ; FAST: successors: %bb.2(0x80000000)
838 ; FAST: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
841 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
842 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
843 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY1]]
844 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
845 ; GREEDY-LABEL: name: phi_s1_vcc_scc_sbranch
847 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
848 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
849 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
850 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
851 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
852 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
853 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
854 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
855 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
858 ; GREEDY: successors: %bb.2(0x80000000)
859 ; GREEDY: [[ICMP2:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
862 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
863 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
864 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
865 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
866 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
867 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
869 successors: %bb.1, %bb.2
870 liveins: $vgpr0, $sgpr0, $sgpr1
872 %0:_(s32) = COPY $vgpr0
873 %1:_(s32) = COPY $sgpr0
874 %2:_(s32) = COPY $sgpr1
875 %3:_(s32) = G_CONSTANT i32 0
876 %4:_(s1) = G_ICMP intpred(eq), %0, %3
877 %5:_(s1) = G_ICMP intpred(eq), %2, %3
884 %6:_(s1) = G_ICMP intpred(eq), %1, %3
888 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
889 %8:_(s32) = G_SELECT %7, %3, %1
890 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
895 name: phi_s1_vcc_vcc_sbranch
897 tracksRegLiveness: true
900 ; FAST-LABEL: name: phi_s1_vcc_vcc_sbranch
902 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
903 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
904 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
905 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
906 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
907 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
908 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
909 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
910 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
913 ; FAST: successors: %bb.2(0x80000000)
914 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
917 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
918 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
919 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY3]], [[COPY]]
920 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
921 ; GREEDY-LABEL: name: phi_s1_vcc_vcc_sbranch
923 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
924 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
925 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
926 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
927 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
928 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
929 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
930 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
931 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
934 ; GREEDY: successors: %bb.2(0x80000000)
935 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
938 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
939 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
940 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY3]], [[COPY]]
941 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
943 successors: %bb.1, %bb.2
944 liveins: $vgpr0, $vgpr1, $sgpr0
946 %0:_(s32) = COPY $vgpr0
947 %1:_(s32) = COPY $vgpr1
948 %2:_(s32) = COPY $sgpr0
949 %3:_(s32) = G_CONSTANT i32 0
950 %4:_(s1) = G_ICMP intpred(eq), %0, %3
951 %5:_(s1) = G_ICMP intpred(eq), %2, %3
958 %6:_(s1) = G_ICMP intpred(eq), %1, %3
962 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
963 %8:_(s32) = G_SELECT %7, %3, %0
964 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
969 name: phi_s1_s_scc_sbranch
971 tracksRegLiveness: true
974 ; FAST-LABEL: name: phi_s1_s_scc_sbranch
976 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
977 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
978 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
979 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
980 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
981 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
982 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
983 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
984 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
987 ; FAST: successors: %bb.2(0x80000000)
988 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
991 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
992 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
993 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
994 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
995 ; GREEDY-LABEL: name: phi_s1_s_scc_sbranch
997 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
998 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
999 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1000 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1001 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1002 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1003 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1004 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1005 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1006 ; GREEDY: G_BR %bb.2
1008 ; GREEDY: successors: %bb.2(0x80000000)
1009 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1010 ; GREEDY: G_BR %bb.2
1012 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1013 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1014 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1015 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1016 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1017 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1019 successors: %bb.1, %bb.2
1020 liveins: $sgpr0, $sgpr1, $sgpr2
1022 %0:_(s32) = COPY $sgpr0
1023 %1:_(s32) = COPY $sgpr1
1024 %2:_(s32) = COPY $sgpr2
1025 %3:_(s32) = G_CONSTANT i32 0
1026 %4:_(s1) = G_TRUNC %0
1027 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1034 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1038 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1039 %8:_(s32) = G_SELECT %7, %3, %0
1040 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1045 name: phi_s1_scc_s_sbranch
1047 tracksRegLiveness: true
1050 ; FAST-LABEL: name: phi_s1_scc_s_sbranch
1052 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1053 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1054 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1055 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1056 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1057 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1058 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1059 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1060 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
1063 ; FAST: successors: %bb.2(0x80000000)
1064 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1067 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1068 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
1069 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
1070 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1071 ; GREEDY-LABEL: name: phi_s1_scc_s_sbranch
1073 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1074 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1075 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1076 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1077 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1078 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1079 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1080 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1081 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
1082 ; GREEDY: G_BR %bb.2
1084 ; GREEDY: successors: %bb.2(0x80000000)
1085 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1086 ; GREEDY: G_BR %bb.2
1088 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1089 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1090 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1091 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1092 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1093 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1095 successors: %bb.1, %bb.2
1096 liveins: $sgpr0, $sgpr1, $sgpr2
1098 %0:_(s32) = COPY $sgpr0
1099 %1:_(s32) = COPY $sgpr1
1100 %2:_(s32) = COPY $sgpr2
1101 %3:_(s32) = G_CONSTANT i32 0
1102 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1103 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1110 %6:_(s1) = G_TRUNC %1
1114 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1115 %8:_(s32) = G_SELECT %7, %3, %0
1116 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1121 name: phi_s1_scc_v_sbranch
1123 tracksRegLiveness: true
1126 ; FAST-LABEL: name: phi_s1_scc_v_sbranch
1128 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1129 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1130 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1131 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1132 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1133 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1134 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1135 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1136 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
1139 ; FAST: successors: %bb.2(0x80000000)
1140 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1143 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1144 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1145 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1146 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1147 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1148 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1149 ; GREEDY-LABEL: name: phi_s1_scc_v_sbranch
1151 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1152 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1153 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1154 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1155 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1156 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1157 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1158 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1159 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
1160 ; GREEDY: G_BR %bb.2
1162 ; GREEDY: successors: %bb.2(0x80000000)
1163 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1164 ; GREEDY: G_BR %bb.2
1166 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1167 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1168 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1169 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1170 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1171 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1173 successors: %bb.1, %bb.2
1174 liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1176 %0:_(s32) = COPY $sgpr0
1177 %1:_(s32) = COPY $vgpr0
1178 %2:_(s32) = COPY $sgpr2
1179 %3:_(s32) = G_CONSTANT i32 0
1180 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1181 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1188 %6:_(s1) = G_TRUNC %1
1192 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1193 %8:_(s32) = G_SELECT %7, %3, %0
1194 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1199 name: phi_s1_v_scc_sbranch
1201 tracksRegLiveness: true
1204 ; FAST-LABEL: name: phi_s1_v_scc_sbranch
1206 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1207 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1208 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1209 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1210 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1211 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1212 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1213 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1214 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1217 ; FAST: successors: %bb.2(0x80000000)
1218 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1221 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1222 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1223 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1224 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1225 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1226 ; GREEDY-LABEL: name: phi_s1_v_scc_sbranch
1228 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1229 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1230 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1231 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1232 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1233 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1234 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1235 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1236 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1237 ; GREEDY: G_BR %bb.2
1239 ; GREEDY: successors: %bb.2(0x80000000)
1240 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1241 ; GREEDY: G_BR %bb.2
1243 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1244 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1245 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1246 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1247 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1249 successors: %bb.1, %bb.2
1250 liveins: $vgpr0, $sgpr0, $sgpr1
1252 %0:_(s32) = COPY $vgpr0
1253 %1:_(s32) = COPY $sgpr0
1254 %2:_(s32) = COPY $sgpr1
1255 %3:_(s32) = G_CONSTANT i32 0
1256 %4:_(s1) = G_TRUNC %0
1257 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1264 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1268 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1269 %8:_(s32) = G_SELECT %7, %3, %0
1270 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1275 name: phi_s1_vcc_s_sbranch
1277 tracksRegLiveness: true
1280 ; FAST-LABEL: name: phi_s1_vcc_s_sbranch
1282 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1283 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1284 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1285 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1286 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1287 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1288 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1289 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1290 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
1293 ; FAST: successors: %bb.2(0x80000000)
1294 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1297 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1298 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1299 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1300 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1301 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1302 ; GREEDY-LABEL: name: phi_s1_vcc_s_sbranch
1304 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1305 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1306 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1307 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1308 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1309 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1310 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1311 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1312 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
1313 ; GREEDY: G_BR %bb.2
1315 ; GREEDY: successors: %bb.2(0x80000000)
1316 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1317 ; GREEDY: G_BR %bb.2
1319 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1320 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1321 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1322 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1323 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1325 successors: %bb.1, %bb.2
1326 liveins: $vgpr0, $sgpr0, $sgpr1
1328 %0:_(s32) = COPY $vgpr0
1329 %1:_(s32) = COPY $sgpr0
1330 %2:_(s32) = COPY $sgpr1
1331 %3:_(s32) = G_CONSTANT i32 0
1332 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1333 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1340 %6:_(s1) = G_TRUNC %1
1344 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1345 %8:_(s32) = G_SELECT %7, %3, %0
1346 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1351 name: phi_s1_s_vcc_sbranch
1353 tracksRegLiveness: true
1356 ; FAST-LABEL: name: phi_s1_s_vcc_sbranch
1358 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1359 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1360 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1361 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1362 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1363 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1364 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1365 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1366 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1369 ; FAST: successors: %bb.2(0x80000000)
1370 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1373 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1374 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1375 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1376 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1377 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1378 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1379 ; GREEDY-LABEL: name: phi_s1_s_vcc_sbranch
1381 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1382 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1383 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1384 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1385 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1386 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1387 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1388 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1389 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1390 ; GREEDY: G_BR %bb.2
1392 ; GREEDY: successors: %bb.2(0x80000000)
1393 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1394 ; GREEDY: G_BR %bb.2
1396 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1397 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1398 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1399 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1400 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1401 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1403 successors: %bb.1, %bb.2
1404 liveins: $vgpr0, $sgpr0, $sgpr1
1406 %0:_(s32) = COPY $sgpr0
1407 %1:_(s32) = COPY $vgpr0
1408 %2:_(s32) = COPY $sgpr1
1409 %3:_(s32) = G_CONSTANT i32 0
1410 %4:_(s1) = G_TRUNC %0
1411 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1418 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1422 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1423 %8:_(s32) = G_SELECT %7, %3, %0
1424 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1429 name: phi_s1_vcc_v_sbranch
1431 tracksRegLiveness: true
1434 ; FAST-LABEL: name: phi_s1_vcc_v_sbranch
1436 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1437 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1438 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1439 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1440 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1441 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1442 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1443 ; FAST: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1444 ; FAST: G_BRCOND [[ICMP1]](s1), %bb.1
1447 ; FAST: successors: %bb.2(0x80000000)
1448 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1451 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1452 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1453 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1454 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1455 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1456 ; GREEDY-LABEL: name: phi_s1_vcc_v_sbranch
1458 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1459 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1460 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1461 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1462 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1463 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1464 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1465 ; GREEDY: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1466 ; GREEDY: G_BRCOND [[ICMP1]](s1), %bb.1
1467 ; GREEDY: G_BR %bb.2
1469 ; GREEDY: successors: %bb.2(0x80000000)
1470 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1471 ; GREEDY: G_BR %bb.2
1473 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[ICMP]](s1), %bb.0, [[TRUNC]](s1), %bb.1
1474 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1475 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1476 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1477 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1479 successors: %bb.1, %bb.2
1480 liveins: $vgpr0, $vgpr1, $sgpr0
1482 %0:_(s32) = COPY $vgpr0
1483 %1:_(s32) = COPY $vgpr1
1484 %2:_(s32) = COPY $sgpr0
1485 %3:_(s32) = G_CONSTANT i32 0
1486 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1487 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1494 %6:_(s1) = G_TRUNC %1
1498 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1499 %8:_(s32) = G_SELECT %7, %3, %0
1500 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1505 name: phi_s1_v_vcc_sbranch
1507 tracksRegLiveness: true
1510 ; FAST-LABEL: name: phi_s1_v_vcc_sbranch
1512 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1513 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1514 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1515 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1516 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1517 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1518 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1519 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1520 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1523 ; FAST: successors: %bb.2(0x80000000)
1524 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1527 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1528 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1529 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1530 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1531 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1532 ; GREEDY-LABEL: name: phi_s1_v_vcc_sbranch
1534 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1535 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1536 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1537 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1538 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1539 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1540 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1541 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1542 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1543 ; GREEDY: G_BR %bb.2
1545 ; GREEDY: successors: %bb.2(0x80000000)
1546 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1547 ; GREEDY: G_BR %bb.2
1549 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1550 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1551 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1552 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1553 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1555 successors: %bb.1, %bb.2
1556 liveins: $vgpr0, $vgpr1, $sgpr0
1558 %0:_(s32) = COPY $vgpr0
1559 %1:_(s32) = COPY $vgpr1
1560 %2:_(s32) = COPY $sgpr0
1561 %3:_(s32) = G_CONSTANT i32 0
1562 %4:_(s1) = G_TRUNC %0
1563 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1570 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1574 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1575 %8:_(s32) = G_SELECT %7, %3, %0
1576 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1581 name: phi_s1_v_s_sbranch
1583 tracksRegLiveness: true
1586 ; FAST-LABEL: name: phi_s1_v_s_sbranch
1588 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1589 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1590 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1591 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1592 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1593 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1594 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1595 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1596 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1599 ; FAST: successors: %bb.2(0x80000000)
1600 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1603 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1604 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1605 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1606 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1607 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1608 ; GREEDY-LABEL: name: phi_s1_v_s_sbranch
1610 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1611 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1612 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1613 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1614 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1615 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1616 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1617 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1618 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1619 ; GREEDY: G_BR %bb.2
1621 ; GREEDY: successors: %bb.2(0x80000000)
1622 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1623 ; GREEDY: G_BR %bb.2
1625 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1626 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1627 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1628 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1629 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1631 successors: %bb.1, %bb.2
1632 liveins: $vgpr0, $sgpr0, $sgpr1
1634 %0:_(s32) = COPY $vgpr0
1635 %1:_(s32) = COPY $sgpr0
1636 %2:_(s32) = COPY $sgpr1
1637 %3:_(s32) = G_CONSTANT i32 0
1638 %4:_(s1) = G_TRUNC %0
1639 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1646 %6:_(s1) = G_TRUNC %1
1650 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1651 %8:_(s32) = G_SELECT %7, %3, %0
1652 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1657 name: phi_s1_s_v_sbranch
1659 tracksRegLiveness: true
1662 ; FAST-LABEL: name: phi_s1_s_v_sbranch
1664 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1665 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1666 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1667 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1668 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1669 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1670 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1671 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1672 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1675 ; FAST: successors: %bb.2(0x80000000)
1676 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1679 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1680 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1681 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1682 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1683 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1684 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1685 ; GREEDY-LABEL: name: phi_s1_s_v_sbranch
1687 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1688 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1689 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1690 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1691 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1692 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1693 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1694 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1695 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1696 ; GREEDY: G_BR %bb.2
1698 ; GREEDY: successors: %bb.2(0x80000000)
1699 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1700 ; GREEDY: G_BR %bb.2
1702 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1703 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1704 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1705 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1706 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1707 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1709 successors: %bb.1, %bb.2
1710 liveins: $vgpr0, $sgpr0, $sgpr1
1712 %0:_(s32) = COPY $sgpr0
1713 %1:_(s32) = COPY $vgpr0
1714 %2:_(s32) = COPY $sgpr1
1715 %3:_(s32) = G_CONSTANT i32 0
1716 %4:_(s1) = G_TRUNC %0
1717 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1724 %6:_(s1) = G_TRUNC %1
1728 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1729 %8:_(s32) = G_SELECT %7, %3, %0
1730 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1735 name: phi_s1_v_v_sbranch
1737 tracksRegLiveness: true
1740 ; FAST-LABEL: name: phi_s1_v_v_sbranch
1742 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1743 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1744 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1745 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1746 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1747 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1748 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1749 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1750 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1753 ; FAST: successors: %bb.2(0x80000000)
1754 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1757 ; FAST: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1758 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1759 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1760 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1761 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1762 ; GREEDY-LABEL: name: phi_s1_v_v_sbranch
1764 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1765 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1766 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1767 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1768 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1769 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1770 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1771 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1772 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1773 ; GREEDY: G_BR %bb.2
1775 ; GREEDY: successors: %bb.2(0x80000000)
1776 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1777 ; GREEDY: G_BR %bb.2
1779 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1780 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1781 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1782 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1783 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1785 successors: %bb.1, %bb.2
1786 liveins: $vgpr0, $vgpr1, $sgpr0
1788 %0:_(s32) = COPY $vgpr0
1789 %1:_(s32) = COPY $vgpr1
1790 %2:_(s32) = COPY $sgpr0
1791 %3:_(s32) = G_CONSTANT i32 0
1792 %4:_(s1) = G_TRUNC %0
1793 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1800 %6:_(s1) = G_TRUNC %1
1804 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1805 %8:_(s32) = G_SELECT %7, %3, %0
1806 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1811 name: phi_s1_s_s_sbranch
1813 tracksRegLiveness: true
1816 ; FAST-LABEL: name: phi_s1_s_s_sbranch
1818 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1819 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1820 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1821 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1822 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1823 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1824 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1825 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1826 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1829 ; FAST: successors: %bb.2(0x80000000)
1830 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1833 ; FAST: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1834 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[PHI]](s1)
1835 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[COPY3]](s1), [[C]], [[COPY]]
1836 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1837 ; GREEDY-LABEL: name: phi_s1_s_s_sbranch
1839 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1840 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1841 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1842 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1843 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1844 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1845 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1846 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1847 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1848 ; GREEDY: G_BR %bb.2
1850 ; GREEDY: successors: %bb.2(0x80000000)
1851 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1852 ; GREEDY: G_BR %bb.2
1854 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[TRUNC1]](s1), %bb.1
1855 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[PHI]](s1)
1856 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1857 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1858 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1859 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1861 successors: %bb.1, %bb.2
1862 liveins: $sgpr0, $sgpr1, $sgpr2
1864 %0:_(s32) = COPY $sgpr0
1865 %1:_(s32) = COPY $sgpr1
1866 %2:_(s32) = COPY $sgpr2
1867 %3:_(s32) = G_CONSTANT i32 0
1868 %4:_(s1) = G_TRUNC %0
1869 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1876 %6:_(s1) = G_TRUNC %1
1880 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1881 %8:_(s32) = G_SELECT %7, %3, %0
1882 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1886 # Test a phi where the VGPR input is after the phi itself
1888 name: phi_s32_s_loop_v_sbranch
1890 tracksRegLiveness: true
1893 ; FAST-LABEL: name: phi_s32_s_loop_v_sbranch
1895 ; FAST: successors: %bb.1(0x80000000)
1896 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
1897 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1898 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1899 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1900 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1903 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1904 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
1905 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
1906 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1907 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1910 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
1911 ; GREEDY-LABEL: name: phi_s32_s_loop_v_sbranch
1913 ; GREEDY: successors: %bb.1(0x80000000)
1914 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
1915 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1916 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1917 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1918 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1919 ; GREEDY: G_BR %bb.1
1921 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1922 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
1923 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
1924 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1925 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1926 ; GREEDY: G_BR %bb.2
1928 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
1931 liveins: $sgpr0, $sgpr1, $vgpr0
1933 %0:_(s32) = COPY $sgpr0
1934 %1:_(s32) = COPY $sgpr1
1935 %2:_(s32) = COPY $vgpr0
1936 %3:_(s32) = G_CONSTANT i32 0
1940 successors: %bb.1, %bb.2
1942 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
1944 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1949 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4
1953 # Test a phi where an SGPR input is after the phi itself
1955 name: phi_s32_s_loop_s_sbranch
1957 tracksRegLiveness: true
1960 ; FAST-LABEL: name: phi_s32_s_loop_s_sbranch
1962 ; FAST: successors: %bb.1(0x80000000)
1963 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1964 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1965 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1966 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1967 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1970 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1971 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
1972 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32)
1973 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1974 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
1977 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
1978 ; GREEDY-LABEL: name: phi_s32_s_loop_s_sbranch
1980 ; GREEDY: successors: %bb.1(0x80000000)
1981 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1982 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1983 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1984 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1985 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1986 ; GREEDY: G_BR %bb.1
1988 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1989 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
1990 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32)
1991 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1992 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
1993 ; GREEDY: G_BR %bb.2
1995 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
1998 liveins: $sgpr0, $sgpr1, $sgpr2
2000 %0:_(s32) = COPY $sgpr0
2001 %1:_(s32) = COPY $sgpr1
2002 %2:_(s32) = COPY $sgpr2
2003 %3:_(s32) = G_CONSTANT i32 0
2007 successors: %bb.1, %bb.2
2009 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2011 %6:_(s1) = G_ICMP intpred(eq), %1, %3
2016 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4
2021 name: phi_s32_ss_sbranch_cycle
2023 tracksRegLiveness: true
2026 ; FAST-LABEL: name: phi_s32_ss_sbranch_cycle
2028 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2029 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
2030 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2031 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2032 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2033 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2034 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2035 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
2038 ; FAST: successors: %bb.2(0x80000000)
2039 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2042 ; FAST: successors: %bb.1(0x80000000)
2043 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2045 ; GREEDY-LABEL: name: phi_s32_ss_sbranch_cycle
2047 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2048 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
2049 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2050 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2051 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2052 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2053 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2054 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
2055 ; GREEDY: G_BR %bb.2
2057 ; GREEDY: successors: %bb.2(0x80000000)
2058 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2059 ; GREEDY: G_BR %bb.2
2061 ; GREEDY: successors: %bb.1(0x80000000)
2062 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2063 ; GREEDY: G_BR %bb.1
2065 successors: %bb.1, %bb.2
2066 liveins: $sgpr0, $sgpr1, $sgpr2
2068 %0:_(s32) = COPY $sgpr0
2069 %1:_(s32) = COPY $sgpr1
2070 %2:_(s32) = COPY $sgpr2
2071 %3:_(s32) = G_CONSTANT i32 0
2072 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2078 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2
2083 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2088 name: phi_s32_vs_sbranch_cycle
2090 tracksRegLiveness: true
2093 ; FAST-LABEL: name: phi_s32_vs_sbranch_cycle
2095 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2096 ; FAST: liveins: $vgpr0, $sgpr1, $sgpr2
2097 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2098 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2099 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2100 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2101 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2102 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
2105 ; FAST: successors: %bb.2(0x80000000)
2106 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2109 ; FAST: successors: %bb.1(0x80000000)
2110 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2112 ; GREEDY-LABEL: name: phi_s32_vs_sbranch_cycle
2114 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2115 ; GREEDY: liveins: $vgpr0, $sgpr1, $sgpr2
2116 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2117 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2118 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2119 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2120 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2121 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
2122 ; GREEDY: G_BR %bb.2
2124 ; GREEDY: successors: %bb.2(0x80000000)
2125 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2126 ; GREEDY: G_BR %bb.2
2128 ; GREEDY: successors: %bb.1(0x80000000)
2129 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2130 ; GREEDY: G_BR %bb.1
2132 successors: %bb.1, %bb.2
2133 liveins: $vgpr0, $sgpr1, $sgpr2
2135 %0:_(s32) = COPY $vgpr0
2136 %1:_(s32) = COPY $sgpr1
2137 %2:_(s32) = COPY $sgpr2
2138 %3:_(s32) = G_CONSTANT i32 0
2139 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2145 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2
2150 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1