1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx908 -run-pass=regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=FAST %s
3 # RUN: llc -march=amdgcn -mcpu=gfx908 -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]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
20 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
21 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
22 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
25 ; FAST: successors: %bb.2(0x80000000)
26 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
29 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
30 ; FAST: $sgpr0 = COPY [[PHI]](s32)
31 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
32 ; GREEDY-LABEL: name: phi_s32_ss_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]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
41 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
42 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
43 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
46 ; GREEDY: successors: %bb.2(0x80000000)
47 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
50 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
51 ; GREEDY: $sgpr0 = COPY [[PHI]](s32)
52 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
54 successors: %bb.1, %bb.2
55 liveins: $sgpr0, $sgpr1, $sgpr2
57 %0:_(s32) = COPY $sgpr0
58 %1:_(s32) = COPY $sgpr1
59 %2:_(s32) = COPY $sgpr2
60 %3:_(s32) = G_CONSTANT i32 0
61 %4:_(s1) = G_ICMP intpred(eq), %2, %3
72 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
74 S_SETPC_B64 undef $sgpr30_sgpr31
79 name: phi_s32_sv_sbranch
81 tracksRegLiveness: true
84 ; FAST-LABEL: name: phi_s32_sv_sbranch
86 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
87 ; FAST: liveins: $sgpr0, $vgpr0, $sgpr1
88 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
89 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
90 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
91 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
92 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
93 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
94 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
95 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
98 ; FAST: successors: %bb.2(0x80000000)
99 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
102 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
103 ; FAST: $vgpr0 = COPY [[PHI]](s32)
104 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
105 ; GREEDY-LABEL: name: phi_s32_sv_sbranch
107 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
108 ; GREEDY: liveins: $sgpr0, $vgpr0, $sgpr1
109 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
110 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
111 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
112 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
113 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
114 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
115 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
116 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
119 ; GREEDY: successors: %bb.2(0x80000000)
120 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
123 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
124 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
125 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
127 successors: %bb.1, %bb.2
128 liveins: $sgpr0, $vgpr0, $sgpr1
130 %0:_(s32) = COPY $sgpr0
131 %1:_(s32) = COPY $vgpr0
132 %2:_(s32) = COPY $sgpr1
133 %3:_(s32) = G_CONSTANT i32 0
134 %4:_(s1) = G_ICMP intpred(eq), %2, %3
145 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
147 S_SETPC_B64 undef $sgpr30_sgpr31
152 name: phi_s32_vs_sbranch
154 tracksRegLiveness: true
157 ; FAST-LABEL: name: phi_s32_vs_sbranch
159 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
160 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
161 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
162 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
163 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
164 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
165 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
166 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
167 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
168 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
171 ; FAST: successors: %bb.2(0x80000000)
172 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
175 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
176 ; FAST: $vgpr0 = COPY [[PHI]](s32)
177 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
178 ; GREEDY-LABEL: name: phi_s32_vs_sbranch
180 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
181 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
182 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
183 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
184 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
185 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
186 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
187 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
188 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
189 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
192 ; GREEDY: successors: %bb.2(0x80000000)
193 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
196 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
197 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
198 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
200 successors: %bb.1, %bb.2
201 liveins: $vgpr0, $sgpr0, $sgpr1
203 %0:_(s32) = COPY $vgpr0
204 %1:_(s32) = COPY $sgpr0
205 %2:_(s32) = COPY $sgpr1
206 %3:_(s32) = G_CONSTANT i32 0
207 %4:_(s1) = G_ICMP intpred(eq), %2, %3
218 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
220 S_SETPC_B64 undef $sgpr30_sgpr31
225 name: phi_s32_vv_sbranch
227 tracksRegLiveness: true
230 ; FAST-LABEL: name: phi_s32_vv_sbranch
232 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
233 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
234 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
235 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
236 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
237 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
238 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
239 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
240 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
241 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
244 ; FAST: successors: %bb.2(0x80000000)
245 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
248 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
249 ; FAST: $vgpr0 = COPY [[PHI]](s32)
250 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
251 ; GREEDY-LABEL: name: phi_s32_vv_sbranch
253 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
254 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
255 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
256 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
257 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
258 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
259 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
260 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
261 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
262 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
265 ; GREEDY: successors: %bb.2(0x80000000)
266 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
269 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
270 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
271 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
273 successors: %bb.1, %bb.2
274 liveins: $vgpr0, $vgpr1, $sgpr0
276 %0:_(s32) = COPY $vgpr0
277 %1:_(s32) = COPY $vgpr1
278 %2:_(s32) = COPY $sgpr0
279 %3:_(s32) = G_CONSTANT i32 0
280 %4:_(s1) = G_ICMP intpred(eq), %2, %3
291 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
293 S_SETPC_B64 undef $sgpr30_sgpr31
297 name: phi_s32_ss_vcc_sbranch
299 tracksRegLiveness: true
302 ; FAST-LABEL: name: phi_s32_ss_vcc_sbranch
304 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
305 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
306 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
307 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
308 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
309 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
310 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
311 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
312 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
315 ; FAST: successors: %bb.2(0x80000000)
316 ; FAST: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
319 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
320 ; FAST: $sgpr0 = COPY [[PHI]](s32)
321 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
322 ; GREEDY-LABEL: name: phi_s32_ss_vcc_sbranch
324 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
325 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
326 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
327 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
328 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
329 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
330 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
331 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
332 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
335 ; GREEDY: successors: %bb.2(0x80000000)
336 ; GREEDY: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
339 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
340 ; GREEDY: $sgpr0 = COPY [[PHI]](s32)
341 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
343 successors: %bb.1, %bb.2
344 liveins: $sgpr0, $sgpr1, $vgpr0
346 %0:_(s32) = COPY $sgpr0
347 %1:_(s32) = COPY $sgpr1
348 %2:_(s32) = COPY $vgpr0
349 %3:_(s32) = G_CONSTANT i32 0
350 %4:_(s1) = G_ICMP intpred(eq), %2, %3
361 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
363 S_SETPC_B64 undef $sgpr30_sgpr31
368 name: phi_s32_sv_vcc_sbranch
370 tracksRegLiveness: true
373 ; FAST-LABEL: name: phi_s32_sv_vcc_sbranch
375 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
376 ; FAST: liveins: $sgpr0, $vgpr0, $vgpr1
377 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
378 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
379 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
380 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
381 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
382 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
383 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
386 ; FAST: successors: %bb.2(0x80000000)
387 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
390 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
391 ; FAST: $vgpr0 = COPY [[PHI]](s32)
392 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
393 ; GREEDY-LABEL: name: phi_s32_sv_vcc_sbranch
395 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
396 ; GREEDY: liveins: $sgpr0, $vgpr0, $vgpr1
397 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
398 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
399 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
400 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
401 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
402 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
403 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
406 ; GREEDY: successors: %bb.2(0x80000000)
407 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
410 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
411 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
412 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
414 successors: %bb.1, %bb.2
415 liveins: $sgpr0, $vgpr0, $vgpr1
417 %0:_(s32) = COPY $sgpr0
418 %1:_(s32) = COPY $vgpr0
419 %2:_(s32) = COPY $vgpr1
420 %3:_(s32) = G_CONSTANT i32 0
421 %4:_(s1) = G_ICMP intpred(eq), %2, %3
432 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
434 S_SETPC_B64 undef $sgpr30_sgpr31
439 name: phi_s32_vs_vcc_sbranch
441 tracksRegLiveness: true
444 ; FAST-LABEL: name: phi_s32_vs_vcc_sbranch
446 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
447 ; FAST: liveins: $vgpr0, $sgpr0, $vgpr1
448 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
449 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
450 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
451 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
452 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
453 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
454 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
457 ; FAST: successors: %bb.2(0x80000000)
458 ; FAST: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
461 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
462 ; FAST: $vgpr0 = COPY [[PHI]](s32)
463 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
464 ; GREEDY-LABEL: name: phi_s32_vs_vcc_sbranch
466 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
467 ; GREEDY: liveins: $vgpr0, $sgpr0, $vgpr1
468 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
469 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
470 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
471 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
472 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
473 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
474 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
477 ; GREEDY: successors: %bb.2(0x80000000)
478 ; GREEDY: [[COPY4:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
481 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
482 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
483 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
485 successors: %bb.1, %bb.2
486 liveins: $vgpr0, $sgpr0, $vgpr1
488 %0:_(s32) = COPY $vgpr0
489 %1:_(s32) = COPY $sgpr0
490 %2:_(s32) = COPY $vgpr1
491 %3:_(s32) = G_CONSTANT i32 0
492 %4:_(s1) = G_ICMP intpred(eq), %2, %3
503 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
505 S_SETPC_B64 undef $sgpr30_sgpr31
510 name: phi_s32_vv_vcc_sbranch
512 tracksRegLiveness: true
515 ; FAST-LABEL: name: phi_s32_vv_vcc_sbranch
517 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
518 ; FAST: liveins: $vgpr0, $vgpr1, $vgpr2
519 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
520 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
521 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
522 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
523 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
524 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
525 ; FAST: G_BRCOND [[ICMP]](s1), %bb.1
528 ; FAST: successors: %bb.2(0x80000000)
529 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
532 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
533 ; FAST: $vgpr0 = COPY [[PHI]](s32)
534 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
535 ; GREEDY-LABEL: name: phi_s32_vv_vcc_sbranch
537 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
538 ; GREEDY: liveins: $vgpr0, $vgpr1, $vgpr2
539 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
540 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
541 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
542 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
543 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
544 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
545 ; GREEDY: G_BRCOND [[ICMP]](s1), %bb.1
548 ; GREEDY: successors: %bb.2(0x80000000)
549 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
552 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY4]](s32), %bb.1
553 ; GREEDY: $vgpr0 = COPY [[PHI]](s32)
554 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
556 successors: %bb.1, %bb.2
557 liveins: $vgpr0, $vgpr1, $vgpr2
559 %0:_(s32) = COPY $vgpr0
560 %1:_(s32) = COPY $vgpr1
561 %2:_(s32) = COPY $vgpr2
562 %3:_(s32) = G_CONSTANT i32 0
563 %4:_(s1) = G_ICMP intpred(eq), %2, %3
574 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
576 S_SETPC_B64 undef $sgpr30_sgpr31
581 name: phi_s1_scc_scc_sbranch
583 tracksRegLiveness: true
586 ; FAST-LABEL: name: phi_s1_scc_scc_sbranch
588 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
589 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
590 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
591 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
592 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
593 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
594 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
595 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
596 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
597 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
598 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
599 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
600 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
603 ; FAST: successors: %bb.2(0x80000000)
604 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
605 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
606 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
609 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
610 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
611 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
612 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
613 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
614 ; GREEDY-LABEL: name: phi_s1_scc_scc_sbranch
616 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
617 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
618 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
619 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
620 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
621 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
622 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
623 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
624 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
625 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
626 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
627 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
628 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
631 ; GREEDY: successors: %bb.2(0x80000000)
632 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
633 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
634 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
637 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
638 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
639 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
640 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
641 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
643 successors: %bb.1, %bb.2
644 liveins: $sgpr0, $sgpr1, $sgpr2
646 %0:_(s32) = COPY $sgpr0
647 %1:_(s32) = COPY $sgpr1
648 %2:_(s32) = COPY $sgpr2
649 %3:_(s32) = G_CONSTANT i32 0
650 %4:_(s1) = G_ICMP intpred(eq), %0, %3
651 %5:_(s1) = G_ICMP intpred(eq), %2, %3
658 %6:_(s1) = G_ICMP intpred(eq), %1, %3
662 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
663 %8:_(s32) = G_SELECT %7, %3, %0
664 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
669 name: phi_s1_scc_scc_scc_sbranch
671 tracksRegLiveness: true
674 ; FAST-LABEL: name: phi_s1_scc_scc_scc_sbranch
676 ; FAST: successors: %bb.1(0x40000000), %bb.3(0x40000000)
677 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
678 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
679 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
680 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
681 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
682 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
683 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
684 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
685 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
686 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
687 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
688 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
689 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.3
692 ; FAST: successors: %bb.2(0x40000000), %bb.3(0x40000000)
693 ; FAST: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
694 ; FAST: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
695 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
696 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
697 ; FAST: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
698 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32)
699 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
700 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
701 ; FAST: G_BRCOND [[ZEXT1]](s32), %bb.3
704 ; FAST: successors: %bb.3(0x80000000)
705 ; FAST: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
706 ; FAST: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
707 ; FAST: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32)
708 ; FAST: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1)
711 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2
712 ; FAST: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
713 ; FAST: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1)
714 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]]
715 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
716 ; GREEDY-LABEL: name: phi_s1_scc_scc_scc_sbranch
718 ; GREEDY: successors: %bb.1(0x40000000), %bb.3(0x40000000)
719 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
720 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
721 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
722 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
723 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
724 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
725 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
726 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
727 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
728 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
729 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
730 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
731 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.3
734 ; GREEDY: successors: %bb.2(0x40000000), %bb.3(0x40000000)
735 ; GREEDY: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
736 ; GREEDY: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
737 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
738 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
739 ; GREEDY: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
740 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32)
741 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
742 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
743 ; GREEDY: G_BRCOND [[ZEXT1]](s32), %bb.3
746 ; GREEDY: successors: %bb.3(0x80000000)
747 ; GREEDY: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
748 ; GREEDY: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
749 ; GREEDY: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32)
750 ; GREEDY: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1)
753 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2
754 ; GREEDY: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
755 ; GREEDY: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1)
756 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]]
757 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
759 successors: %bb.1, %bb.3
760 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
762 %0:_(s32) = COPY $sgpr0
763 %1:_(s32) = COPY $sgpr1
764 %2:_(s32) = COPY $sgpr2
765 %3:_(s32) = COPY $sgpr3
766 %4:_(s32) = G_CONSTANT i32 0
767 %5:_(s1) = G_ICMP intpred(eq), %0, %3
768 %6:_(s1) = G_ICMP intpred(eq), %2, %3
773 successors: %bb.2, %bb.3
775 %7:_(s32) = G_CONSTANT i32 99
776 %8:_(s32) = G_CONSTANT i32 888
777 %9:_(s1) = G_ICMP intpred(eq), %1, %7
778 %10:_(s1) = G_ICMP intpred(eq), %1, %8
785 %11:_(s32) = G_CONSTANT i32 123
786 %12:_(s1) = G_ICMP intpred(eq), %2, %11
790 %13:_(s1) = G_PHI %5, %bb.0, %9, %bb.1, %12, %bb.2
791 %14:_(s32) = G_SELECT %13, %0, %1
792 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %14
797 name: phi_s1_scc_vcc_sbranch
799 tracksRegLiveness: true
802 ; FAST-LABEL: name: phi_s1_scc_vcc_sbranch
804 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
805 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
806 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
807 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
808 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
809 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
810 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
811 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
812 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
813 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
814 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
815 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
816 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
819 ; FAST: successors: %bb.2(0x80000000)
820 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
821 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
824 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1
825 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
826 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
827 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
828 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
829 ; GREEDY-LABEL: name: phi_s1_scc_vcc_sbranch
831 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
832 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
833 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
834 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
835 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
836 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
837 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
838 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
839 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
840 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
841 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
842 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
843 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
846 ; GREEDY: successors: %bb.2(0x80000000)
847 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
848 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
851 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1
852 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
853 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
854 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
855 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
857 successors: %bb.1, %bb.2
858 liveins: $sgpr0, $sgpr1, $vgpr0
860 %0:_(s32) = COPY $sgpr0
861 %1:_(s32) = COPY $vgpr0
862 %2:_(s32) = COPY $sgpr1
863 %3:_(s32) = G_CONSTANT i32 0
864 %4:_(s1) = G_ICMP intpred(eq), %0, %3
865 %5:_(s1) = G_ICMP intpred(eq), %2, %3
872 %6:_(s1) = G_ICMP intpred(eq), %1, %3
876 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
877 %8:_(s32) = G_SELECT %7, %3, %0
878 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
883 name: phi_s1_vcc_scc_sbranch
885 tracksRegLiveness: true
888 ; FAST-LABEL: name: phi_s1_vcc_scc_sbranch
890 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
891 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
892 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
893 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
894 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
895 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
896 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
897 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
898 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
899 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
900 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
901 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
904 ; FAST: successors: %bb.2(0x80000000)
905 ; FAST: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
906 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
907 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
910 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
911 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
912 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
913 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
914 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
915 ; GREEDY-LABEL: name: phi_s1_vcc_scc_sbranch
917 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
918 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
919 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
920 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
921 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
922 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
923 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
924 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
925 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
926 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
927 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
928 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
931 ; GREEDY: successors: %bb.2(0x80000000)
932 ; GREEDY: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
933 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
934 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
937 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
938 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
939 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
940 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
941 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
943 successors: %bb.1, %bb.2
944 liveins: $vgpr0, $sgpr0, $sgpr1
946 %0:_(s32) = COPY $vgpr0
947 %1:_(s32) = COPY $sgpr0
948 %2:_(s32) = COPY $sgpr1
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, %1
964 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
969 name: phi_s1_vcc_vcc_sbranch
971 tracksRegLiveness: true
974 ; FAST-LABEL: name: phi_s1_vcc_vcc_sbranch
976 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
977 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
978 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
979 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
980 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
981 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
982 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
983 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
984 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
985 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
986 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
987 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
990 ; FAST: successors: %bb.2(0x80000000)
991 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
992 ; FAST: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
995 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
996 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
997 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
998 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
999 ; GREEDY-LABEL: name: phi_s1_vcc_vcc_sbranch
1001 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1002 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1003 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1004 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1005 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1006 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1007 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1008 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1009 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1010 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1011 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1012 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1013 ; GREEDY: G_BR %bb.2
1015 ; GREEDY: successors: %bb.2(0x80000000)
1016 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1017 ; GREEDY: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
1018 ; GREEDY: G_BR %bb.2
1020 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
1021 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1022 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
1023 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1025 successors: %bb.1, %bb.2
1026 liveins: $vgpr0, $vgpr1, $sgpr0
1028 %0:_(s32) = COPY $vgpr0
1029 %1:_(s32) = COPY $vgpr1
1030 %2:_(s32) = COPY $sgpr0
1031 %3:_(s32) = G_CONSTANT i32 0
1032 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1033 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1040 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1044 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1045 %8:_(s32) = G_SELECT %7, %3, %0
1046 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1051 name: phi_s1_s_scc_sbranch
1053 tracksRegLiveness: true
1056 ; FAST-LABEL: name: phi_s1_s_scc_sbranch
1058 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1059 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1060 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1061 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1062 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1063 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1064 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1065 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1066 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1067 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1068 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1069 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1072 ; FAST: successors: %bb.2(0x80000000)
1073 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1074 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1075 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1078 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1079 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1080 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1081 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1082 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1083 ; GREEDY-LABEL: name: phi_s1_s_scc_sbranch
1085 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1086 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1087 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1088 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1089 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1090 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1091 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1092 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1093 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1094 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1095 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1096 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1097 ; GREEDY: G_BR %bb.2
1099 ; GREEDY: successors: %bb.2(0x80000000)
1100 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1101 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1102 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1103 ; GREEDY: G_BR %bb.2
1105 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1106 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1107 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1108 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1109 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1111 successors: %bb.1, %bb.2
1112 liveins: $sgpr0, $sgpr1, $sgpr2
1114 %0:_(s32) = COPY $sgpr0
1115 %1:_(s32) = COPY $sgpr1
1116 %2:_(s32) = COPY $sgpr2
1117 %3:_(s32) = G_CONSTANT i32 0
1118 %4:_(s1) = G_TRUNC %0
1119 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1126 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1130 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1131 %8:_(s32) = G_SELECT %7, %3, %0
1132 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1137 name: phi_s1_scc_s_sbranch
1139 tracksRegLiveness: true
1142 ; FAST-LABEL: name: phi_s1_scc_s_sbranch
1144 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1145 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
1146 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1147 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1148 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1149 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1150 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1151 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1152 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1153 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1154 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1155 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1156 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1159 ; FAST: successors: %bb.2(0x80000000)
1160 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1161 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1164 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1165 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1166 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1167 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1168 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1169 ; GREEDY-LABEL: name: phi_s1_scc_s_sbranch
1171 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1172 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
1173 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1174 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1175 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1176 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1177 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1178 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1179 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1180 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1181 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1182 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1183 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1184 ; GREEDY: G_BR %bb.2
1186 ; GREEDY: successors: %bb.2(0x80000000)
1187 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1188 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1189 ; GREEDY: G_BR %bb.2
1191 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1192 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1193 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1194 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1195 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1197 successors: %bb.1, %bb.2
1198 liveins: $sgpr0, $sgpr1, $sgpr2
1200 %0:_(s32) = COPY $sgpr0
1201 %1:_(s32) = COPY $sgpr1
1202 %2:_(s32) = COPY $sgpr2
1203 %3:_(s32) = G_CONSTANT i32 0
1204 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1205 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1212 %6:_(s1) = G_TRUNC %1
1216 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1217 %8:_(s32) = G_SELECT %7, %3, %0
1218 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1223 name: phi_s1_scc_v_sbranch
1225 tracksRegLiveness: true
1228 ; FAST-LABEL: name: phi_s1_scc_v_sbranch
1230 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1231 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1232 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1233 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1234 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1235 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1236 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1237 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1238 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1239 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1240 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1241 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1242 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1245 ; FAST: successors: %bb.2(0x80000000)
1246 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1247 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1250 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1251 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1252 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1253 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1254 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1255 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1256 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1257 ; GREEDY-LABEL: name: phi_s1_scc_v_sbranch
1259 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1260 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1261 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1262 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1263 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1264 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1265 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1266 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1267 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1268 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1269 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1270 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1271 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1272 ; GREEDY: G_BR %bb.2
1274 ; GREEDY: successors: %bb.2(0x80000000)
1275 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1276 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1277 ; GREEDY: G_BR %bb.2
1279 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1280 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1281 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1282 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1283 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1284 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1285 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1287 successors: %bb.1, %bb.2
1288 liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
1290 %0:_(s32) = COPY $sgpr0
1291 %1:_(s32) = COPY $vgpr0
1292 %2:_(s32) = COPY $sgpr2
1293 %3:_(s32) = G_CONSTANT i32 0
1294 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1295 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1302 %6:_(s1) = G_TRUNC %1
1306 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1307 %8:_(s32) = G_SELECT %7, %3, %0
1308 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1313 name: phi_s1_v_scc_sbranch
1315 tracksRegLiveness: true
1318 ; FAST-LABEL: name: phi_s1_v_scc_sbranch
1320 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1321 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1322 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1323 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1324 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1325 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1326 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1327 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1328 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1329 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1330 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1331 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1334 ; FAST: successors: %bb.2(0x80000000)
1335 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1336 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1337 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1340 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1341 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1342 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1343 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1344 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1345 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1346 ; GREEDY-LABEL: name: phi_s1_v_scc_sbranch
1348 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1349 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1350 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1351 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1352 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1353 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1354 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1355 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1356 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1357 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1358 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1359 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1360 ; GREEDY: G_BR %bb.2
1362 ; GREEDY: successors: %bb.2(0x80000000)
1363 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1364 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1365 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1366 ; GREEDY: G_BR %bb.2
1368 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1369 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1370 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1371 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1372 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1373 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1375 successors: %bb.1, %bb.2
1376 liveins: $vgpr0, $sgpr0, $sgpr1
1378 %0:_(s32) = COPY $vgpr0
1379 %1:_(s32) = COPY $sgpr0
1380 %2:_(s32) = COPY $sgpr1
1381 %3:_(s32) = G_CONSTANT i32 0
1382 %4:_(s1) = G_TRUNC %0
1383 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1390 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1394 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1395 %8:_(s32) = G_SELECT %7, %3, %0
1396 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1401 name: phi_s1_vcc_s_sbranch
1403 tracksRegLiveness: true
1406 ; FAST-LABEL: name: phi_s1_vcc_s_sbranch
1408 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1409 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1410 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1411 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1412 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1413 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1414 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1415 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1416 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1417 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1418 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1419 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1422 ; FAST: successors: %bb.2(0x80000000)
1423 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1424 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
1427 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
1428 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1429 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
1430 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1431 ; GREEDY-LABEL: name: phi_s1_vcc_s_sbranch
1433 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1434 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1435 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1436 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1437 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1438 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1439 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1440 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1441 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1442 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1443 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1444 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1445 ; GREEDY: G_BR %bb.2
1447 ; GREEDY: successors: %bb.2(0x80000000)
1448 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1449 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
1450 ; GREEDY: G_BR %bb.2
1452 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
1453 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1454 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
1455 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1457 successors: %bb.1, %bb.2
1458 liveins: $vgpr0, $sgpr0, $sgpr1
1460 %0:_(s32) = COPY $vgpr0
1461 %1:_(s32) = COPY $sgpr0
1462 %2:_(s32) = COPY $sgpr1
1463 %3:_(s32) = G_CONSTANT i32 0
1464 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1465 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1472 %6:_(s1) = G_TRUNC %1
1476 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1477 %8:_(s32) = G_SELECT %7, %3, %0
1478 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1483 name: phi_s1_s_vcc_sbranch
1485 tracksRegLiveness: true
1488 ; FAST-LABEL: name: phi_s1_s_vcc_sbranch
1490 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1491 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1492 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1493 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1494 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1495 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1496 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1497 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1498 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1499 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1500 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1501 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1504 ; FAST: successors: %bb.2(0x80000000)
1505 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1506 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
1509 ; FAST: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1510 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1511 ; FAST: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1512 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
1513 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1514 ; GREEDY-LABEL: name: phi_s1_s_vcc_sbranch
1516 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1517 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1518 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1519 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1520 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1521 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1522 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1523 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1524 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1525 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1526 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1527 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1528 ; GREEDY: G_BR %bb.2
1530 ; GREEDY: successors: %bb.2(0x80000000)
1531 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1532 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
1533 ; GREEDY: G_BR %bb.2
1535 ; GREEDY: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1536 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1537 ; GREEDY: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1538 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
1539 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1541 successors: %bb.1, %bb.2
1542 liveins: $vgpr0, $sgpr0, $sgpr1
1544 %0:_(s32) = COPY $sgpr0
1545 %1:_(s32) = COPY $vgpr0
1546 %2:_(s32) = COPY $sgpr1
1547 %3:_(s32) = G_CONSTANT i32 0
1548 %4:_(s1) = G_TRUNC %0
1549 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1556 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1560 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1561 %8:_(s32) = G_SELECT %7, %3, %0
1562 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1567 name: phi_s1_vcc_v_sbranch
1569 tracksRegLiveness: true
1572 ; FAST-LABEL: name: phi_s1_vcc_v_sbranch
1574 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1575 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1576 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1577 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1578 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1579 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1580 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1581 ; FAST: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1582 ; FAST: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1583 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1584 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1585 ; FAST: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1586 ; FAST: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1587 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
1588 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1591 ; FAST: successors: %bb.2(0x80000000)
1592 ; FAST: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1593 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1)
1596 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1
1597 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1598 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1599 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1600 ; FAST: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1601 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1602 ; GREEDY-LABEL: name: phi_s1_vcc_v_sbranch
1604 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1605 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1606 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1607 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1608 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1609 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1610 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1611 ; GREEDY: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1612 ; GREEDY: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1613 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1614 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1615 ; GREEDY: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1616 ; GREEDY: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1617 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
1618 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1619 ; GREEDY: G_BR %bb.2
1621 ; GREEDY: successors: %bb.2(0x80000000)
1622 ; GREEDY: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1623 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1)
1624 ; GREEDY: G_BR %bb.2
1626 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1
1627 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1628 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1629 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1630 ; GREEDY: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1631 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1633 successors: %bb.1, %bb.2
1634 liveins: $vgpr0, $vgpr1, $sgpr0
1636 %0:_(s32) = COPY $vgpr0
1637 %1:_(s32) = COPY $vgpr1
1638 %2:_(s32) = COPY $sgpr0
1639 %3:_(s32) = G_CONSTANT i32 0
1640 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1641 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1648 %6:_(s1) = G_TRUNC %1
1652 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1653 %8:_(s32) = G_SELECT %7, %3, %0
1654 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1659 name: phi_s1_v_vcc_sbranch
1661 tracksRegLiveness: true
1664 ; FAST-LABEL: name: phi_s1_v_vcc_sbranch
1666 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1667 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1668 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1669 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1670 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1671 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1672 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1673 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1674 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1675 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1676 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1677 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1680 ; FAST: successors: %bb.2(0x80000000)
1681 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1682 ; FAST: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]]
1683 ; FAST: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1684 ; FAST: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1685 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]]
1688 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1
1689 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1690 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1691 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1692 ; FAST: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1693 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1694 ; GREEDY-LABEL: name: phi_s1_v_vcc_sbranch
1696 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1697 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1698 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1699 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1700 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1701 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1702 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1703 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1704 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1705 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1706 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1707 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1708 ; GREEDY: G_BR %bb.2
1710 ; GREEDY: successors: %bb.2(0x80000000)
1711 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1712 ; GREEDY: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]]
1713 ; GREEDY: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1714 ; GREEDY: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1715 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]]
1716 ; GREEDY: G_BR %bb.2
1718 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1
1719 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1720 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1721 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1722 ; GREEDY: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1723 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1725 successors: %bb.1, %bb.2
1726 liveins: $vgpr0, $vgpr1, $sgpr0
1728 %0:_(s32) = COPY $vgpr0
1729 %1:_(s32) = COPY $vgpr1
1730 %2:_(s32) = COPY $sgpr0
1731 %3:_(s32) = G_CONSTANT i32 0
1732 %4:_(s1) = G_TRUNC %0
1733 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1740 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1744 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1745 %8:_(s32) = G_SELECT %7, %3, %0
1746 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1751 name: phi_s1_v_s_sbranch
1753 tracksRegLiveness: true
1756 ; FAST-LABEL: name: phi_s1_v_s_sbranch
1758 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1759 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1760 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1761 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1762 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1763 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1764 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1765 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1766 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1767 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1768 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1769 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1772 ; FAST: successors: %bb.2(0x80000000)
1773 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1774 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1777 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1778 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1779 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1780 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1781 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1782 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1783 ; GREEDY-LABEL: name: phi_s1_v_s_sbranch
1785 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1786 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1787 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1788 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1789 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1790 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1791 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1792 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1793 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1794 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1795 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1796 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1797 ; GREEDY: G_BR %bb.2
1799 ; GREEDY: successors: %bb.2(0x80000000)
1800 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1801 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1802 ; GREEDY: G_BR %bb.2
1804 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1805 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1806 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1807 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1808 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1809 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1811 successors: %bb.1, %bb.2
1812 liveins: $vgpr0, $sgpr0, $sgpr1
1814 %0:_(s32) = COPY $vgpr0
1815 %1:_(s32) = COPY $sgpr0
1816 %2:_(s32) = COPY $sgpr1
1817 %3:_(s32) = G_CONSTANT i32 0
1818 %4:_(s1) = G_TRUNC %0
1819 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1826 %6:_(s1) = G_TRUNC %1
1830 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1831 %8:_(s32) = G_SELECT %7, %3, %0
1832 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1837 name: phi_s1_s_v_sbranch
1839 tracksRegLiveness: true
1842 ; FAST-LABEL: name: phi_s1_s_v_sbranch
1844 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1845 ; FAST: liveins: $vgpr0, $sgpr0, $sgpr1
1846 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1847 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1848 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1849 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1850 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1851 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1852 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1853 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1854 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1855 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1858 ; FAST: successors: %bb.2(0x80000000)
1859 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1860 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1863 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1864 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1865 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1866 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1867 ; FAST: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1868 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1869 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1870 ; GREEDY-LABEL: name: phi_s1_s_v_sbranch
1872 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1873 ; GREEDY: liveins: $vgpr0, $sgpr0, $sgpr1
1874 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1875 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1876 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1877 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1878 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1879 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1880 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1881 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1882 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1883 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1884 ; GREEDY: G_BR %bb.2
1886 ; GREEDY: successors: %bb.2(0x80000000)
1887 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1888 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1889 ; GREEDY: G_BR %bb.2
1891 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1892 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1893 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1894 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1895 ; GREEDY: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1896 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1897 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1899 successors: %bb.1, %bb.2
1900 liveins: $vgpr0, $sgpr0, $sgpr1
1902 %0:_(s32) = COPY $sgpr0
1903 %1:_(s32) = COPY $vgpr0
1904 %2:_(s32) = COPY $sgpr1
1905 %3:_(s32) = G_CONSTANT i32 0
1906 %4:_(s1) = G_TRUNC %0
1907 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1914 %6:_(s1) = G_TRUNC %1
1918 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1919 %8:_(s32) = G_SELECT %7, %3, %0
1920 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1925 name: phi_s1_v_v_sbranch
1927 tracksRegLiveness: true
1930 ; FAST-LABEL: name: phi_s1_v_v_sbranch
1932 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1933 ; FAST: liveins: $vgpr0, $vgpr1, $sgpr0
1934 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1935 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1936 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1937 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1938 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1939 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1940 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1941 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1942 ; FAST: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1943 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
1946 ; FAST: successors: %bb.2(0x80000000)
1947 ; FAST: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1948 ; FAST: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1951 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1952 ; FAST: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1953 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1954 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1955 ; FAST: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1956 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1957 ; GREEDY-LABEL: name: phi_s1_v_v_sbranch
1959 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1960 ; GREEDY: liveins: $vgpr0, $vgpr1, $sgpr0
1961 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1962 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1963 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1964 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1965 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1966 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1967 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1968 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1969 ; GREEDY: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1970 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
1971 ; GREEDY: G_BR %bb.2
1973 ; GREEDY: successors: %bb.2(0x80000000)
1974 ; GREEDY: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1975 ; GREEDY: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1976 ; GREEDY: G_BR %bb.2
1978 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1979 ; GREEDY: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1980 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1981 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1982 ; GREEDY: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1983 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1985 successors: %bb.1, %bb.2
1986 liveins: $vgpr0, $vgpr1, $sgpr0
1988 %0:_(s32) = COPY $vgpr0
1989 %1:_(s32) = COPY $vgpr1
1990 %2:_(s32) = COPY $sgpr0
1991 %3:_(s32) = G_CONSTANT i32 0
1992 %4:_(s1) = G_TRUNC %0
1993 %5:_(s1) = G_ICMP intpred(eq), %2, %3
2000 %6:_(s1) = G_TRUNC %1
2004 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
2005 %8:_(s32) = G_SELECT %7, %3, %0
2006 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
2011 name: phi_s1_s_s_sbranch
2013 tracksRegLiveness: true
2016 ; FAST-LABEL: name: phi_s1_s_s_sbranch
2018 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2019 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
2020 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2021 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2022 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2023 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2024 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
2025 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2026 ; FAST: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2027 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
2028 ; FAST: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
2029 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2032 ; FAST: successors: %bb.2(0x80000000)
2033 ; FAST: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
2034 ; FAST: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
2037 ; FAST: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
2038 ; FAST: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
2039 ; FAST: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
2040 ; FAST: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
2041 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
2042 ; GREEDY-LABEL: name: phi_s1_s_s_sbranch
2044 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2045 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
2046 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2047 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2048 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2049 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2050 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
2051 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2052 ; GREEDY: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2053 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
2054 ; GREEDY: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
2055 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2056 ; GREEDY: G_BR %bb.2
2058 ; GREEDY: successors: %bb.2(0x80000000)
2059 ; GREEDY: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
2060 ; GREEDY: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
2061 ; GREEDY: G_BR %bb.2
2063 ; GREEDY: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
2064 ; GREEDY: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
2065 ; GREEDY: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
2066 ; GREEDY: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
2067 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
2069 successors: %bb.1, %bb.2
2070 liveins: $sgpr0, $sgpr1, $sgpr2
2072 %0:_(s32) = COPY $sgpr0
2073 %1:_(s32) = COPY $sgpr1
2074 %2:_(s32) = COPY $sgpr2
2075 %3:_(s32) = G_CONSTANT i32 0
2076 %4:_(s1) = G_TRUNC %0
2077 %5:_(s1) = G_ICMP intpred(eq), %2, %3
2084 %6:_(s1) = G_TRUNC %1
2088 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
2089 %8:_(s32) = G_SELECT %7, %3, %0
2090 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
2094 # Test a phi where the VGPR input is after the phi itself
2096 name: phi_s32_s_loop_v_sbranch
2098 tracksRegLiveness: true
2101 ; FAST-LABEL: name: phi_s32_s_loop_v_sbranch
2103 ; FAST: successors: %bb.1(0x80000000)
2104 ; FAST: liveins: $sgpr0, $sgpr1, $vgpr0
2105 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2106 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2107 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2108 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2111 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2112 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
2113 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
2114 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
2115 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2116 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2117 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2120 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
2121 ; GREEDY-LABEL: name: phi_s32_s_loop_v_sbranch
2123 ; GREEDY: successors: %bb.1(0x80000000)
2124 ; GREEDY: liveins: $sgpr0, $sgpr1, $vgpr0
2125 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2126 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2127 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2128 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2129 ; GREEDY: G_BR %bb.1
2131 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2132 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
2133 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY2]](s32)
2134 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
2135 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2136 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2137 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2138 ; GREEDY: G_BR %bb.2
2140 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
2143 liveins: $sgpr0, $sgpr1, $vgpr0
2145 %0:_(s32) = COPY $sgpr0
2146 %1:_(s32) = COPY $sgpr1
2147 %2:_(s32) = COPY $vgpr0
2148 %3:_(s32) = G_CONSTANT i32 0
2152 successors: %bb.1, %bb.2
2154 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2156 %6:_(s1) = G_ICMP intpred(eq), %1, %3
2161 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4
2165 # Test a phi where an SGPR input is after the phi itself
2167 name: phi_s32_s_loop_s_sbranch
2169 tracksRegLiveness: true
2172 ; FAST-LABEL: name: phi_s32_s_loop_s_sbranch
2174 ; FAST: successors: %bb.1(0x80000000)
2175 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
2176 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2177 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2178 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2179 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2182 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2183 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
2184 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32)
2185 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
2186 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2187 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2188 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2191 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
2192 ; GREEDY-LABEL: name: phi_s32_s_loop_s_sbranch
2194 ; GREEDY: successors: %bb.1(0x80000000)
2195 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
2196 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2197 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2198 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2199 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2200 ; GREEDY: G_BR %bb.1
2202 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2203 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %5(s32), %bb.1
2204 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY2]](s32)
2205 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
2206 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2207 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2208 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2209 ; GREEDY: G_BR %bb.2
2211 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](s32)
2214 liveins: $sgpr0, $sgpr1, $sgpr2
2216 %0:_(s32) = COPY $sgpr0
2217 %1:_(s32) = COPY $sgpr1
2218 %2:_(s32) = COPY $sgpr2
2219 %3:_(s32) = G_CONSTANT i32 0
2223 successors: %bb.1, %bb.2
2225 %4:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2227 %6:_(s1) = G_ICMP intpred(eq), %1, %3
2232 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %4
2237 name: phi_s32_ss_sbranch_cycle
2239 tracksRegLiveness: true
2242 ; FAST-LABEL: name: phi_s32_ss_sbranch_cycle
2244 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2245 ; FAST: liveins: $sgpr0, $sgpr1, $sgpr2
2246 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2247 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2248 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2249 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2250 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2251 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2252 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2253 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2256 ; FAST: successors: %bb.2(0x80000000)
2257 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2260 ; FAST: successors: %bb.1(0x80000000)
2261 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2263 ; GREEDY-LABEL: name: phi_s32_ss_sbranch_cycle
2265 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2266 ; GREEDY: liveins: $sgpr0, $sgpr1, $sgpr2
2267 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2268 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2269 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2270 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2271 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2272 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2273 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2274 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2275 ; GREEDY: G_BR %bb.2
2277 ; GREEDY: successors: %bb.2(0x80000000)
2278 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2279 ; GREEDY: G_BR %bb.2
2281 ; GREEDY: successors: %bb.1(0x80000000)
2282 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2283 ; GREEDY: G_BR %bb.1
2285 successors: %bb.1, %bb.2
2286 liveins: $sgpr0, $sgpr1, $sgpr2
2288 %0:_(s32) = COPY $sgpr0
2289 %1:_(s32) = COPY $sgpr1
2290 %2:_(s32) = COPY $sgpr2
2291 %3:_(s32) = G_CONSTANT i32 0
2292 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2298 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2
2303 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2308 name: phi_s32_vs_sbranch_cycle
2310 tracksRegLiveness: true
2313 ; FAST-LABEL: name: phi_s32_vs_sbranch_cycle
2315 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2316 ; FAST: liveins: $vgpr0, $sgpr1, $sgpr2
2317 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2318 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2319 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2320 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2321 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2322 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2323 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2324 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2327 ; FAST: successors: %bb.2(0x80000000)
2328 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2331 ; FAST: successors: %bb.1(0x80000000)
2332 ; FAST: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2334 ; GREEDY-LABEL: name: phi_s32_vs_sbranch_cycle
2336 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2337 ; GREEDY: liveins: $vgpr0, $sgpr1, $sgpr2
2338 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2339 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
2340 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2341 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2342 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2343 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2344 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2345 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2346 ; GREEDY: G_BR %bb.2
2348 ; GREEDY: successors: %bb.2(0x80000000)
2349 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, %6(s32), %bb.2
2350 ; GREEDY: G_BR %bb.2
2352 ; GREEDY: successors: %bb.1(0x80000000)
2353 ; GREEDY: [[PHI1:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[PHI]](s32), %bb.1
2354 ; GREEDY: G_BR %bb.1
2356 successors: %bb.1, %bb.2
2357 liveins: $vgpr0, $sgpr1, $sgpr2
2359 %0:_(s32) = COPY $vgpr0
2360 %1:_(s32) = COPY $sgpr1
2361 %2:_(s32) = COPY $sgpr2
2362 %3:_(s32) = G_CONSTANT i32 0
2363 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2369 %5:_(s32) = G_PHI %0, %bb.0, %6, %bb.2
2374 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2379 name: phi_s32_aa_sbranch
2381 tracksRegLiveness: true
2384 ; FAST-LABEL: name: phi_s32_aa_sbranch
2386 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2387 ; FAST: liveins: $agpr0, $agpr1, $sgpr2
2388 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2389 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr1
2390 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2391 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2392 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2393 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2394 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2395 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2398 ; FAST: successors: %bb.2(0x80000000)
2399 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2402 ; FAST: [[PHI:%[0-9]+]]:agpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2403 ; FAST: $agpr0 = COPY [[PHI]](s32)
2404 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
2405 ; GREEDY-LABEL: name: phi_s32_aa_sbranch
2407 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2408 ; GREEDY: liveins: $agpr0, $agpr1, $sgpr2
2409 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2410 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr1
2411 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2412 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2413 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2414 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2415 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2416 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2417 ; GREEDY: G_BR %bb.2
2419 ; GREEDY: successors: %bb.2(0x80000000)
2420 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2421 ; GREEDY: G_BR %bb.2
2423 ; GREEDY: [[PHI:%[0-9]+]]:agpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2424 ; GREEDY: $agpr0 = COPY [[PHI]](s32)
2425 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
2427 successors: %bb.1, %bb.2
2428 liveins: $agpr0, $agpr1, $sgpr2
2430 %0:_(s32) = COPY $agpr0
2431 %1:_(s32) = COPY $agpr1
2432 %2:_(s32) = COPY $sgpr2
2433 %3:_(s32) = G_CONSTANT i32 0
2434 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2445 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2447 S_SETPC_B64 undef $sgpr30_sgpr31
2452 name: phi_s32_av_sbranch
2454 tracksRegLiveness: true
2457 ; FAST-LABEL: name: phi_s32_av_sbranch
2459 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2460 ; FAST: liveins: $agpr0, $vgpr0, $sgpr2
2461 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2462 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2463 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2464 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2465 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2466 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2467 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2468 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2471 ; FAST: successors: %bb.2(0x80000000)
2472 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
2475 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2476 ; FAST: $agpr0 = COPY [[PHI]](s32)
2477 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
2478 ; GREEDY-LABEL: name: phi_s32_av_sbranch
2480 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2481 ; GREEDY: liveins: $agpr0, $vgpr0, $sgpr2
2482 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2483 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2484 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2485 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2486 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2487 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2488 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2489 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2490 ; GREEDY: G_BR %bb.2
2492 ; GREEDY: successors: %bb.2(0x80000000)
2493 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
2494 ; GREEDY: G_BR %bb.2
2496 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2497 ; GREEDY: $agpr0 = COPY [[PHI]](s32)
2498 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
2500 successors: %bb.1, %bb.2
2501 liveins: $agpr0, $vgpr0, $sgpr2
2503 %0:_(s32) = COPY $agpr0
2504 %1:_(s32) = COPY $vgpr0
2505 %2:_(s32) = COPY $sgpr2
2506 %3:_(s32) = G_CONSTANT i32 0
2507 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2518 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2520 S_SETPC_B64 undef $sgpr30_sgpr31
2524 name: phi_s32_va_sbranch
2526 tracksRegLiveness: true
2529 ; FAST-LABEL: name: phi_s32_va_sbranch
2531 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2532 ; FAST: liveins: $agpr0, $vgpr0, $sgpr2
2533 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2534 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0
2535 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2536 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2537 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2538 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2539 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2540 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2543 ; FAST: successors: %bb.2(0x80000000)
2544 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2547 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2548 ; FAST: $agpr0 = COPY [[PHI]](s32)
2549 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
2550 ; GREEDY-LABEL: name: phi_s32_va_sbranch
2552 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2553 ; GREEDY: liveins: $agpr0, $vgpr0, $sgpr2
2554 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
2555 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0
2556 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2557 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2558 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2559 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2560 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2561 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2562 ; GREEDY: G_BR %bb.2
2564 ; GREEDY: successors: %bb.2(0x80000000)
2565 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2566 ; GREEDY: G_BR %bb.2
2568 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2569 ; GREEDY: $agpr0 = COPY [[PHI]](s32)
2570 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
2572 successors: %bb.1, %bb.2
2573 liveins: $agpr0, $vgpr0, $sgpr2
2575 %0:_(s32) = COPY $vgpr0
2576 %1:_(s32) = COPY $agpr0
2577 %2:_(s32) = COPY $sgpr2
2578 %3:_(s32) = G_CONSTANT i32 0
2579 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2590 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2592 S_SETPC_B64 undef $sgpr30_sgpr31
2597 name: phi_s32_as_sbranch
2599 tracksRegLiveness: true
2602 ; FAST-LABEL: name: phi_s32_as_sbranch
2604 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2605 ; FAST: liveins: $agpr0, $sgpr0, $sgpr2
2606 ; FAST: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2607 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2608 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2609 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2610 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2611 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2612 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2613 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2616 ; FAST: successors: %bb.2(0x80000000)
2617 ; FAST: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
2620 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2621 ; FAST: $agpr0 = COPY [[PHI]](s32)
2622 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
2623 ; GREEDY-LABEL: name: phi_s32_as_sbranch
2625 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2626 ; GREEDY: liveins: $agpr0, $sgpr0, $sgpr2
2627 ; GREEDY: [[COPY:%[0-9]+]]:agpr(s32) = COPY $agpr0
2628 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2629 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2630 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2631 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2632 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2633 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2634 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2635 ; GREEDY: G_BR %bb.2
2637 ; GREEDY: successors: %bb.2(0x80000000)
2638 ; GREEDY: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY [[COPY1]](s32)
2639 ; GREEDY: G_BR %bb.2
2641 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2642 ; GREEDY: $agpr0 = COPY [[PHI]](s32)
2643 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
2645 successors: %bb.1, %bb.2
2646 liveins: $agpr0, $sgpr0, $sgpr2
2648 %0:_(s32) = COPY $agpr0
2649 %1:_(s32) = COPY $sgpr0
2650 %2:_(s32) = COPY $sgpr2
2651 %3:_(s32) = G_CONSTANT i32 0
2652 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2663 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2665 S_SETPC_B64 undef $sgpr30_sgpr31
2670 name: phi_s32_sa_sbranch
2672 tracksRegLiveness: true
2675 ; FAST-LABEL: name: phi_s32_sa_sbranch
2677 ; FAST: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2678 ; FAST: liveins: $agpr0, $sgpr0, $sgpr2
2679 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2680 ; FAST: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0
2681 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2682 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2683 ; FAST: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2684 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2685 ; FAST: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2686 ; FAST: G_BRCOND [[ZEXT]](s32), %bb.1
2689 ; FAST: successors: %bb.2(0x80000000)
2690 ; FAST: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2693 ; FAST: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2694 ; FAST: $agpr0 = COPY [[PHI]](s32)
2695 ; FAST: S_SETPC_B64 undef $sgpr30_sgpr31
2696 ; GREEDY-LABEL: name: phi_s32_sa_sbranch
2698 ; GREEDY: successors: %bb.1(0x40000000), %bb.2(0x40000000)
2699 ; GREEDY: liveins: $agpr0, $sgpr0, $sgpr2
2700 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
2701 ; GREEDY: [[COPY1:%[0-9]+]]:agpr(s32) = COPY $agpr0
2702 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
2703 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
2704 ; GREEDY: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
2705 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
2706 ; GREEDY: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
2707 ; GREEDY: G_BRCOND [[ZEXT]](s32), %bb.1
2708 ; GREEDY: G_BR %bb.2
2710 ; GREEDY: successors: %bb.2(0x80000000)
2711 ; GREEDY: [[COPY3:%[0-9]+]]:agpr(s32) = COPY [[COPY1]](s32)
2712 ; GREEDY: G_BR %bb.2
2714 ; GREEDY: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[COPY]](s32), %bb.0, [[COPY3]](s32), %bb.1
2715 ; GREEDY: $agpr0 = COPY [[PHI]](s32)
2716 ; GREEDY: S_SETPC_B64 undef $sgpr30_sgpr31
2718 successors: %bb.1, %bb.2
2719 liveins: $agpr0, $sgpr0, $sgpr2
2721 %0:_(s32) = COPY $sgpr0
2722 %1:_(s32) = COPY $agpr0
2723 %2:_(s32) = COPY $sgpr2
2724 %3:_(s32) = G_CONSTANT i32 0
2725 %4:_(s1) = G_ICMP intpred(eq), %2, %3
2736 %6:_(s32) = G_PHI %0, %bb.0, %5, %bb.1
2738 S_SETPC_B64 undef $sgpr30_sgpr31