1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-fast -verify-machineinstrs -o - %s | FileCheck -check-prefix=FAST %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect -regbankselect-greedy -verify-machineinstrs -o - %s | FileCheck -check-prefix=GREEDY %s
6 name: phi_s1_scc_scc_sbranch
8 tracksRegLiveness: true
11 ; FAST-LABEL: name: phi_s1_scc_scc_sbranch
13 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
14 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
16 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
17 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
18 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
19 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
20 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
21 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
22 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
23 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
24 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
25 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
26 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
27 ; FAST-NEXT: G_BR %bb.2
30 ; FAST-NEXT: successors: %bb.2(0x80000000)
32 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
33 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
34 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
35 ; FAST-NEXT: G_BR %bb.2
38 ; FAST-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
39 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
40 ; FAST-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
41 ; FAST-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
42 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
43 ; GREEDY-LABEL: name: phi_s1_scc_scc_sbranch
45 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
46 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
48 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
49 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
50 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
51 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
52 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
53 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
54 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
55 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
56 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
57 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
58 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
59 ; GREEDY-NEXT: G_BR %bb.2
62 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
64 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
65 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
66 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
67 ; GREEDY-NEXT: G_BR %bb.2
70 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
71 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
72 ; GREEDY-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
73 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
74 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
76 successors: %bb.1, %bb.2
77 liveins: $sgpr0, $sgpr1, $sgpr2
79 %0:_(s32) = COPY $sgpr0
80 %1:_(s32) = COPY $sgpr1
81 %2:_(s32) = COPY $sgpr2
82 %3:_(s32) = G_CONSTANT i32 0
83 %4:_(s1) = G_ICMP intpred(eq), %0, %3
84 %5:_(s1) = G_ICMP intpred(eq), %2, %3
91 %6:_(s1) = G_ICMP intpred(eq), %1, %3
95 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
96 %8:_(s32) = G_SELECT %7, %3, %0
97 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
102 name: phi_s1_scc_scc_scc_sbranch
104 tracksRegLiveness: true
107 ; FAST-LABEL: name: phi_s1_scc_scc_scc_sbranch
109 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.3(0x40000000)
110 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
112 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
113 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
114 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
115 ; FAST-NEXT: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
116 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
117 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
118 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
119 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
120 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
121 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
122 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
123 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.3
124 ; FAST-NEXT: G_BR %bb.1
127 ; FAST-NEXT: successors: %bb.2(0x40000000), %bb.3(0x40000000)
129 ; FAST-NEXT: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
130 ; FAST-NEXT: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
131 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
132 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
133 ; FAST-NEXT: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
134 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32)
135 ; FAST-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
136 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
137 ; FAST-NEXT: G_BRCOND [[ZEXT1]](s32), %bb.3
138 ; FAST-NEXT: G_BR %bb.2
141 ; FAST-NEXT: successors: %bb.3(0x80000000)
143 ; FAST-NEXT: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
144 ; FAST-NEXT: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
145 ; FAST-NEXT: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32)
146 ; FAST-NEXT: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1)
147 ; FAST-NEXT: G_BR %bb.3
150 ; FAST-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2
151 ; FAST-NEXT: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
152 ; FAST-NEXT: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1)
153 ; FAST-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]]
154 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
155 ; GREEDY-LABEL: name: phi_s1_scc_scc_scc_sbranch
157 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.3(0x40000000)
158 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
159 ; GREEDY-NEXT: {{ $}}
160 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
161 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
162 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
163 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
164 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
165 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
166 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
167 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[COPY3]]
168 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
169 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
170 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
171 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.3
172 ; GREEDY-NEXT: G_BR %bb.1
173 ; GREEDY-NEXT: {{ $}}
175 ; GREEDY-NEXT: successors: %bb.2(0x40000000), %bb.3(0x40000000)
176 ; GREEDY-NEXT: {{ $}}
177 ; GREEDY-NEXT: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 99
178 ; GREEDY-NEXT: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 888
179 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C1]]
180 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
181 ; GREEDY-NEXT: [[ICMP3:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C2]]
182 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP3]](s32)
183 ; GREEDY-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
184 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
185 ; GREEDY-NEXT: G_BRCOND [[ZEXT1]](s32), %bb.3
186 ; GREEDY-NEXT: G_BR %bb.2
187 ; GREEDY-NEXT: {{ $}}
189 ; GREEDY-NEXT: successors: %bb.3(0x80000000)
190 ; GREEDY-NEXT: {{ $}}
191 ; GREEDY-NEXT: [[C3:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
192 ; GREEDY-NEXT: [[ICMP4:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C3]]
193 ; GREEDY-NEXT: [[TRUNC4:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP4]](s32)
194 ; GREEDY-NEXT: [[ANYEXT2:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC4]](s1)
195 ; GREEDY-NEXT: G_BR %bb.3
196 ; GREEDY-NEXT: {{ $}}
198 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1, [[ANYEXT2]](s32), %bb.2
199 ; GREEDY-NEXT: [[TRUNC5:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
200 ; GREEDY-NEXT: [[ZEXT2:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC5]](s1)
201 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT2]](s32), [[COPY]], [[COPY1]]
202 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
204 successors: %bb.1, %bb.3
205 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
207 %0:_(s32) = COPY $sgpr0
208 %1:_(s32) = COPY $sgpr1
209 %2:_(s32) = COPY $sgpr2
210 %3:_(s32) = COPY $sgpr3
211 %4:_(s32) = G_CONSTANT i32 0
212 %5:_(s1) = G_ICMP intpred(eq), %0, %3
213 %6:_(s1) = G_ICMP intpred(eq), %2, %3
218 successors: %bb.2, %bb.3
220 %7:_(s32) = G_CONSTANT i32 99
221 %8:_(s32) = G_CONSTANT i32 888
222 %9:_(s1) = G_ICMP intpred(eq), %1, %7
223 %10:_(s1) = G_ICMP intpred(eq), %1, %8
230 %11:_(s32) = G_CONSTANT i32 123
231 %12:_(s1) = G_ICMP intpred(eq), %2, %11
235 %13:_(s1) = G_PHI %5, %bb.0, %9, %bb.1, %12, %bb.2
236 %14:_(s32) = G_SELECT %13, %0, %1
237 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %14
242 name: phi_s1_scc_vcc_sbranch
244 tracksRegLiveness: true
247 ; FAST-LABEL: name: phi_s1_scc_vcc_sbranch
249 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
250 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $vgpr0
252 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
253 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
254 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
255 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
256 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
257 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
258 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
259 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
260 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
261 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
262 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
263 ; FAST-NEXT: G_BR %bb.2
266 ; FAST-NEXT: successors: %bb.2(0x80000000)
268 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
269 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
270 ; FAST-NEXT: G_BR %bb.2
273 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1
274 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
275 ; FAST-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
276 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
277 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
278 ; GREEDY-LABEL: name: phi_s1_scc_vcc_sbranch
280 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
281 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $vgpr0
282 ; GREEDY-NEXT: {{ $}}
283 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
284 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
285 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
286 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
287 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
288 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
289 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
290 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
291 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
292 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
293 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
294 ; GREEDY-NEXT: G_BR %bb.2
295 ; GREEDY-NEXT: {{ $}}
297 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
298 ; GREEDY-NEXT: {{ $}}
299 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
300 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
301 ; GREEDY-NEXT: G_BR %bb.2
302 ; GREEDY-NEXT: {{ $}}
304 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP2]](s1), %bb.1
305 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
306 ; GREEDY-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
307 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
308 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
310 successors: %bb.1, %bb.2
311 liveins: $sgpr0, $sgpr1, $vgpr0
313 %0:_(s32) = COPY $sgpr0
314 %1:_(s32) = COPY $vgpr0
315 %2:_(s32) = COPY $sgpr1
316 %3:_(s32) = G_CONSTANT i32 0
317 %4:_(s1) = G_ICMP intpred(eq), %0, %3
318 %5:_(s1) = G_ICMP intpred(eq), %2, %3
325 %6:_(s1) = G_ICMP intpred(eq), %1, %3
329 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
330 %8:_(s32) = G_SELECT %7, %3, %0
331 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
336 name: phi_s1_vcc_scc_sbranch
338 tracksRegLiveness: true
341 ; FAST-LABEL: name: phi_s1_vcc_scc_sbranch
343 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
344 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
346 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
347 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
348 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
349 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
350 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
351 ; FAST-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
352 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
353 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
354 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
355 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
356 ; FAST-NEXT: G_BR %bb.2
359 ; FAST-NEXT: successors: %bb.2(0x80000000)
361 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
362 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
363 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
364 ; FAST-NEXT: G_BR %bb.2
367 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
368 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
369 ; FAST-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
370 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
371 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
372 ; GREEDY-LABEL: name: phi_s1_vcc_scc_sbranch
374 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
375 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
376 ; GREEDY-NEXT: {{ $}}
377 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
378 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
379 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
380 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
381 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
382 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
383 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
384 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
385 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
386 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
387 ; GREEDY-NEXT: G_BR %bb.2
388 ; GREEDY-NEXT: {{ $}}
390 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
391 ; GREEDY-NEXT: {{ $}}
392 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
393 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
394 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
395 ; GREEDY-NEXT: G_BR %bb.2
396 ; GREEDY-NEXT: {{ $}}
398 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
399 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
400 ; GREEDY-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
401 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
402 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
404 successors: %bb.1, %bb.2
405 liveins: $vgpr0, $sgpr0, $sgpr1
407 %0:_(s32) = COPY $vgpr0
408 %1:_(s32) = COPY $sgpr0
409 %2:_(s32) = COPY $sgpr1
410 %3:_(s32) = G_CONSTANT i32 0
411 %4:_(s1) = G_ICMP intpred(eq), %0, %3
412 %5:_(s1) = G_ICMP intpred(eq), %2, %3
419 %6:_(s1) = G_ICMP intpred(eq), %1, %3
423 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
424 %8:_(s32) = G_SELECT %7, %3, %1
425 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
430 name: phi_s1_vcc_vcc_sbranch
432 tracksRegLiveness: true
435 ; FAST-LABEL: name: phi_s1_vcc_vcc_sbranch
437 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
438 ; FAST-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
440 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
441 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
442 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
443 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
444 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
445 ; FAST-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
446 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
447 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
448 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
449 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
450 ; FAST-NEXT: G_BR %bb.2
453 ; FAST-NEXT: successors: %bb.2(0x80000000)
455 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
456 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
457 ; FAST-NEXT: G_BR %bb.2
460 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
461 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
462 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
463 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
464 ; GREEDY-LABEL: name: phi_s1_vcc_vcc_sbranch
466 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
467 ; GREEDY-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
468 ; GREEDY-NEXT: {{ $}}
469 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
470 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
471 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
472 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
473 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
474 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
475 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
476 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
477 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
478 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
479 ; GREEDY-NEXT: G_BR %bb.2
480 ; GREEDY-NEXT: {{ $}}
482 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
483 ; GREEDY-NEXT: {{ $}}
484 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
485 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
486 ; GREEDY-NEXT: G_BR %bb.2
487 ; GREEDY-NEXT: {{ $}}
489 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP2]](s1), %bb.1
490 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
491 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
492 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
494 successors: %bb.1, %bb.2
495 liveins: $vgpr0, $vgpr1, $sgpr0
497 %0:_(s32) = COPY $vgpr0
498 %1:_(s32) = COPY $vgpr1
499 %2:_(s32) = COPY $sgpr0
500 %3:_(s32) = G_CONSTANT i32 0
501 %4:_(s1) = G_ICMP intpred(eq), %0, %3
502 %5:_(s1) = G_ICMP intpred(eq), %2, %3
509 %6:_(s1) = G_ICMP intpred(eq), %1, %3
513 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
514 %8:_(s32) = G_SELECT %7, %3, %0
515 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
520 name: phi_s1_s_scc_sbranch
522 tracksRegLiveness: true
525 ; FAST-LABEL: name: phi_s1_s_scc_sbranch
527 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
528 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
530 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
531 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
532 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
533 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
534 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
535 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
536 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
537 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
538 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
539 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
540 ; FAST-NEXT: G_BR %bb.2
543 ; FAST-NEXT: successors: %bb.2(0x80000000)
545 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
546 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
547 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
548 ; FAST-NEXT: G_BR %bb.2
551 ; FAST-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
552 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
553 ; FAST-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
554 ; FAST-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
555 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
556 ; GREEDY-LABEL: name: phi_s1_s_scc_sbranch
558 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
559 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
560 ; GREEDY-NEXT: {{ $}}
561 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
562 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
563 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
564 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
565 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
566 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
567 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
568 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
569 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
570 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
571 ; GREEDY-NEXT: G_BR %bb.2
572 ; GREEDY-NEXT: {{ $}}
574 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
575 ; GREEDY-NEXT: {{ $}}
576 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
577 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
578 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
579 ; GREEDY-NEXT: G_BR %bb.2
580 ; GREEDY-NEXT: {{ $}}
582 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
583 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
584 ; GREEDY-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
585 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
586 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
588 successors: %bb.1, %bb.2
589 liveins: $sgpr0, $sgpr1, $sgpr2
591 %0:_(s32) = COPY $sgpr0
592 %1:_(s32) = COPY $sgpr1
593 %2:_(s32) = COPY $sgpr2
594 %3:_(s32) = G_CONSTANT i32 0
595 %4:_(s1) = G_TRUNC %0
596 %5:_(s1) = G_ICMP intpred(eq), %2, %3
603 %6:_(s1) = G_ICMP intpred(eq), %1, %3
607 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
608 %8:_(s32) = G_SELECT %7, %3, %0
609 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
614 name: phi_s1_scc_s_sbranch
616 tracksRegLiveness: true
619 ; FAST-LABEL: name: phi_s1_scc_s_sbranch
621 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
622 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
624 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
625 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
626 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
627 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
628 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
629 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
630 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
631 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
632 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
633 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
634 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
635 ; FAST-NEXT: G_BR %bb.2
638 ; FAST-NEXT: successors: %bb.2(0x80000000)
640 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
641 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
642 ; FAST-NEXT: G_BR %bb.2
645 ; FAST-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
646 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
647 ; FAST-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
648 ; FAST-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
649 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
650 ; GREEDY-LABEL: name: phi_s1_scc_s_sbranch
652 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
653 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
654 ; GREEDY-NEXT: {{ $}}
655 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
656 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
657 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
658 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
659 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
660 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
661 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
662 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
663 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
664 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
665 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
666 ; GREEDY-NEXT: G_BR %bb.2
667 ; GREEDY-NEXT: {{ $}}
669 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
670 ; GREEDY-NEXT: {{ $}}
671 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
672 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
673 ; GREEDY-NEXT: G_BR %bb.2
674 ; GREEDY-NEXT: {{ $}}
676 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
677 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
678 ; GREEDY-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
679 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
680 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
682 successors: %bb.1, %bb.2
683 liveins: $sgpr0, $sgpr1, $sgpr2
685 %0:_(s32) = COPY $sgpr0
686 %1:_(s32) = COPY $sgpr1
687 %2:_(s32) = COPY $sgpr2
688 %3:_(s32) = G_CONSTANT i32 0
689 %4:_(s1) = G_ICMP intpred(eq), %0, %3
690 %5:_(s1) = G_ICMP intpred(eq), %2, %3
697 %6:_(s1) = G_TRUNC %1
701 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
702 %8:_(s32) = G_SELECT %7, %3, %0
703 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
708 name: phi_s1_scc_v_sbranch
710 tracksRegLiveness: true
713 ; FAST-LABEL: name: phi_s1_scc_v_sbranch
715 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
716 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
718 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
719 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
720 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
721 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
722 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
723 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
724 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
725 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
726 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
727 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
728 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
729 ; FAST-NEXT: G_BR %bb.2
732 ; FAST-NEXT: successors: %bb.2(0x80000000)
734 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
735 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
736 ; FAST-NEXT: G_BR %bb.2
739 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
740 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
741 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
742 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
743 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
744 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
745 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
746 ; GREEDY-LABEL: name: phi_s1_scc_v_sbranch
748 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
749 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
750 ; GREEDY-NEXT: {{ $}}
751 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
752 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
753 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
754 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
755 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
756 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
757 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
758 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
759 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
760 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
761 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
762 ; GREEDY-NEXT: G_BR %bb.2
763 ; GREEDY-NEXT: {{ $}}
765 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
766 ; GREEDY-NEXT: {{ $}}
767 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
768 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
769 ; GREEDY-NEXT: G_BR %bb.2
770 ; GREEDY-NEXT: {{ $}}
772 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
773 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
774 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
775 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
776 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
777 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
778 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
780 successors: %bb.1, %bb.2
781 liveins: $vgpr0, $sgpr0, $sgpr1, $sgpr2
783 %0:_(s32) = COPY $sgpr0
784 %1:_(s32) = COPY $vgpr0
785 %2:_(s32) = COPY $sgpr2
786 %3:_(s32) = G_CONSTANT i32 0
787 %4:_(s1) = G_ICMP intpred(eq), %0, %3
788 %5:_(s1) = G_ICMP intpred(eq), %2, %3
795 %6:_(s1) = G_TRUNC %1
799 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
800 %8:_(s32) = G_SELECT %7, %3, %0
801 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
806 name: phi_s1_v_scc_sbranch
808 tracksRegLiveness: true
811 ; FAST-LABEL: name: phi_s1_v_scc_sbranch
813 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
814 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
816 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
817 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
818 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
819 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
820 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
821 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
822 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
823 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
824 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
825 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
826 ; FAST-NEXT: G_BR %bb.2
829 ; FAST-NEXT: successors: %bb.2(0x80000000)
831 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
832 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
833 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
834 ; FAST-NEXT: G_BR %bb.2
837 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
838 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
839 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
840 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
841 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
842 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
843 ; GREEDY-LABEL: name: phi_s1_v_scc_sbranch
845 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
846 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
847 ; GREEDY-NEXT: {{ $}}
848 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
849 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
850 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
851 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
852 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
853 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
854 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
855 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
856 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
857 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
858 ; GREEDY-NEXT: G_BR %bb.2
859 ; GREEDY-NEXT: {{ $}}
861 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
862 ; GREEDY-NEXT: {{ $}}
863 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
864 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
865 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
866 ; GREEDY-NEXT: G_BR %bb.2
867 ; GREEDY-NEXT: {{ $}}
869 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
870 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
871 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
872 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
873 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
874 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
876 successors: %bb.1, %bb.2
877 liveins: $vgpr0, $sgpr0, $sgpr1
879 %0:_(s32) = COPY $vgpr0
880 %1:_(s32) = COPY $sgpr0
881 %2:_(s32) = COPY $sgpr1
882 %3:_(s32) = G_CONSTANT i32 0
883 %4:_(s1) = G_TRUNC %0
884 %5:_(s1) = G_ICMP intpred(eq), %2, %3
891 %6:_(s1) = G_ICMP intpred(eq), %1, %3
895 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
896 %8:_(s32) = G_SELECT %7, %3, %0
897 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
902 name: phi_s1_vcc_s_sbranch
904 tracksRegLiveness: true
907 ; FAST-LABEL: name: phi_s1_vcc_s_sbranch
909 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
910 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
912 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
913 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
914 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
915 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
916 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
917 ; FAST-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
918 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
919 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
920 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
921 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
922 ; FAST-NEXT: G_BR %bb.2
925 ; FAST-NEXT: successors: %bb.2(0x80000000)
927 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
928 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
929 ; FAST-NEXT: G_BR %bb.2
932 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
933 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
934 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
935 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
936 ; GREEDY-LABEL: name: phi_s1_vcc_s_sbranch
938 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
939 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
940 ; GREEDY-NEXT: {{ $}}
941 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
942 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
943 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
944 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
945 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
946 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
947 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
948 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
949 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
950 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
951 ; GREEDY-NEXT: G_BR %bb.2
952 ; GREEDY-NEXT: {{ $}}
954 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
955 ; GREEDY-NEXT: {{ $}}
956 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
957 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC1]](s1)
958 ; GREEDY-NEXT: G_BR %bb.2
959 ; GREEDY-NEXT: {{ $}}
961 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[ICMP]](s1), %bb.0, [[COPY4]](s1), %bb.1
962 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
963 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY]]
964 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
966 successors: %bb.1, %bb.2
967 liveins: $vgpr0, $sgpr0, $sgpr1
969 %0:_(s32) = COPY $vgpr0
970 %1:_(s32) = COPY $sgpr0
971 %2:_(s32) = COPY $sgpr1
972 %3:_(s32) = G_CONSTANT i32 0
973 %4:_(s1) = G_ICMP intpred(eq), %0, %3
974 %5:_(s1) = G_ICMP intpred(eq), %2, %3
981 %6:_(s1) = G_TRUNC %1
985 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
986 %8:_(s32) = G_SELECT %7, %3, %0
987 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
992 name: phi_s1_s_vcc_sbranch
994 tracksRegLiveness: true
997 ; FAST-LABEL: name: phi_s1_s_vcc_sbranch
999 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1000 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1002 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1003 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1004 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1005 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1006 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1007 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1008 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1009 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1010 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1011 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1012 ; FAST-NEXT: G_BR %bb.2
1015 ; FAST-NEXT: successors: %bb.2(0x80000000)
1017 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1018 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
1019 ; FAST-NEXT: G_BR %bb.2
1022 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1023 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1024 ; FAST-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1025 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
1026 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1027 ; GREEDY-LABEL: name: phi_s1_s_vcc_sbranch
1029 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1030 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1031 ; GREEDY-NEXT: {{ $}}
1032 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1033 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1034 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1035 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1036 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1037 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1038 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1039 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1040 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1041 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1042 ; GREEDY-NEXT: G_BR %bb.2
1043 ; GREEDY-NEXT: {{ $}}
1044 ; GREEDY-NEXT: bb.1:
1045 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1046 ; GREEDY-NEXT: {{ $}}
1047 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1048 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY4]]
1049 ; GREEDY-NEXT: G_BR %bb.2
1050 ; GREEDY-NEXT: {{ $}}
1051 ; GREEDY-NEXT: bb.2:
1052 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[ICMP1]](s1), %bb.1
1053 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1054 ; GREEDY-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1055 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
1056 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1058 successors: %bb.1, %bb.2
1059 liveins: $vgpr0, $sgpr0, $sgpr1
1061 %0:_(s32) = COPY $sgpr0
1062 %1:_(s32) = COPY $vgpr0
1063 %2:_(s32) = COPY $sgpr1
1064 %3:_(s32) = G_CONSTANT i32 0
1065 %4:_(s1) = G_TRUNC %0
1066 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1073 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1077 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1078 %8:_(s32) = G_SELECT %7, %3, %0
1079 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1084 name: phi_s1_vcc_v_sbranch
1086 tracksRegLiveness: true
1089 ; FAST-LABEL: name: phi_s1_vcc_v_sbranch
1091 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1092 ; FAST-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1094 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1095 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1096 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1097 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1098 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1099 ; FAST-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1100 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1101 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1102 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1103 ; FAST-NEXT: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1104 ; FAST-NEXT: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1105 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
1106 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1107 ; FAST-NEXT: G_BR %bb.2
1110 ; FAST-NEXT: successors: %bb.2(0x80000000)
1112 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1113 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1)
1114 ; FAST-NEXT: G_BR %bb.2
1117 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1
1118 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1119 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1120 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1121 ; FAST-NEXT: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1122 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1123 ; GREEDY-LABEL: name: phi_s1_vcc_v_sbranch
1125 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1126 ; GREEDY-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1127 ; GREEDY-NEXT: {{ $}}
1128 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1129 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1130 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1131 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1132 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1133 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[COPY3]]
1134 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1135 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1136 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC]](s1)
1137 ; GREEDY-NEXT: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1138 ; GREEDY-NEXT: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1139 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP]](s1), [[C1]], [[C2]]
1140 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1141 ; GREEDY-NEXT: G_BR %bb.2
1142 ; GREEDY-NEXT: {{ $}}
1143 ; GREEDY-NEXT: bb.1:
1144 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1145 ; GREEDY-NEXT: {{ $}}
1146 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1147 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC1]](s1)
1148 ; GREEDY-NEXT: G_BR %bb.2
1149 ; GREEDY-NEXT: {{ $}}
1150 ; GREEDY-NEXT: bb.2:
1151 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[SELECT]](s32), %bb.0, [[ANYEXT]](s32), %bb.1
1152 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1153 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1154 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1155 ; GREEDY-NEXT: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1156 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1158 successors: %bb.1, %bb.2
1159 liveins: $vgpr0, $vgpr1, $sgpr0
1161 %0:_(s32) = COPY $vgpr0
1162 %1:_(s32) = COPY $vgpr1
1163 %2:_(s32) = COPY $sgpr0
1164 %3:_(s32) = G_CONSTANT i32 0
1165 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1166 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1173 %6:_(s1) = G_TRUNC %1
1177 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1178 %8:_(s32) = G_SELECT %7, %3, %0
1179 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1184 name: phi_s1_v_vcc_sbranch
1186 tracksRegLiveness: true
1189 ; FAST-LABEL: name: phi_s1_v_vcc_sbranch
1191 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1192 ; FAST-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1194 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1195 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1196 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1197 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1198 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1199 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1200 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1201 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1202 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1203 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1204 ; FAST-NEXT: G_BR %bb.2
1207 ; FAST-NEXT: successors: %bb.2(0x80000000)
1209 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1210 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]]
1211 ; FAST-NEXT: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1212 ; FAST-NEXT: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1213 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]]
1214 ; FAST-NEXT: G_BR %bb.2
1217 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1
1218 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1219 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1220 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1221 ; FAST-NEXT: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1222 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1223 ; GREEDY-LABEL: name: phi_s1_v_vcc_sbranch
1225 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1226 ; GREEDY-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1227 ; GREEDY-NEXT: {{ $}}
1228 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1229 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1230 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1231 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1232 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1233 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1234 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1235 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1236 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1237 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1238 ; GREEDY-NEXT: G_BR %bb.2
1239 ; GREEDY-NEXT: {{ $}}
1240 ; GREEDY-NEXT: bb.1:
1241 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1242 ; GREEDY-NEXT: {{ $}}
1243 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1244 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[COPY3]]
1245 ; GREEDY-NEXT: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 1
1246 ; GREEDY-NEXT: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 0
1247 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[ICMP1]](s1), [[C1]], [[C2]]
1248 ; GREEDY-NEXT: G_BR %bb.2
1249 ; GREEDY-NEXT: {{ $}}
1250 ; GREEDY-NEXT: bb.2:
1251 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[SELECT]](s32), %bb.1
1252 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1253 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1254 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1255 ; GREEDY-NEXT: [[SELECT1:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY4]](s1), [[COPY5]], [[COPY]]
1256 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT1]](s32)
1258 successors: %bb.1, %bb.2
1259 liveins: $vgpr0, $vgpr1, $sgpr0
1261 %0:_(s32) = COPY $vgpr0
1262 %1:_(s32) = COPY $vgpr1
1263 %2:_(s32) = COPY $sgpr0
1264 %3:_(s32) = G_CONSTANT i32 0
1265 %4:_(s1) = G_TRUNC %0
1266 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1273 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1277 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1278 %8:_(s32) = G_SELECT %7, %3, %0
1279 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1284 name: phi_s1_v_s_sbranch
1286 tracksRegLiveness: true
1289 ; FAST-LABEL: name: phi_s1_v_s_sbranch
1291 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1292 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1294 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1295 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1296 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1297 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1298 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1299 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1300 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1301 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1302 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1303 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1304 ; FAST-NEXT: G_BR %bb.2
1307 ; FAST-NEXT: successors: %bb.2(0x80000000)
1309 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1310 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1311 ; FAST-NEXT: G_BR %bb.2
1314 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1315 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1316 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1317 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1318 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1319 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1320 ; GREEDY-LABEL: name: phi_s1_v_s_sbranch
1322 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1323 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1324 ; GREEDY-NEXT: {{ $}}
1325 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1326 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1327 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1328 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1329 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1330 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1331 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1332 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1333 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1334 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1335 ; GREEDY-NEXT: G_BR %bb.2
1336 ; GREEDY-NEXT: {{ $}}
1337 ; GREEDY-NEXT: bb.1:
1338 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1339 ; GREEDY-NEXT: {{ $}}
1340 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1341 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1342 ; GREEDY-NEXT: G_BR %bb.2
1343 ; GREEDY-NEXT: {{ $}}
1344 ; GREEDY-NEXT: bb.2:
1345 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1346 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1347 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1348 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1349 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1350 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1352 successors: %bb.1, %bb.2
1353 liveins: $vgpr0, $sgpr0, $sgpr1
1355 %0:_(s32) = COPY $vgpr0
1356 %1:_(s32) = COPY $sgpr0
1357 %2:_(s32) = COPY $sgpr1
1358 %3:_(s32) = G_CONSTANT i32 0
1359 %4:_(s1) = G_TRUNC %0
1360 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1367 %6:_(s1) = G_TRUNC %1
1371 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1372 %8:_(s32) = G_SELECT %7, %3, %0
1373 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1378 name: phi_s1_s_v_sbranch
1380 tracksRegLiveness: true
1383 ; FAST-LABEL: name: phi_s1_s_v_sbranch
1385 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1386 ; FAST-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1388 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1389 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1390 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1391 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1392 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1393 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1394 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1395 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1396 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1397 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1398 ; FAST-NEXT: G_BR %bb.2
1401 ; FAST-NEXT: successors: %bb.2(0x80000000)
1403 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1404 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1405 ; FAST-NEXT: G_BR %bb.2
1408 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1409 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1410 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1411 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1412 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1413 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1414 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1415 ; GREEDY-LABEL: name: phi_s1_s_v_sbranch
1417 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1418 ; GREEDY-NEXT: liveins: $vgpr0, $sgpr0, $sgpr1
1419 ; GREEDY-NEXT: {{ $}}
1420 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1421 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1422 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1423 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1424 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1425 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1426 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1427 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1428 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1429 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1430 ; GREEDY-NEXT: G_BR %bb.2
1431 ; GREEDY-NEXT: {{ $}}
1432 ; GREEDY-NEXT: bb.1:
1433 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1434 ; GREEDY-NEXT: {{ $}}
1435 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1436 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1437 ; GREEDY-NEXT: G_BR %bb.2
1438 ; GREEDY-NEXT: {{ $}}
1439 ; GREEDY-NEXT: bb.2:
1440 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1441 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1442 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1443 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1444 ; GREEDY-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
1445 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY5]]
1446 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1448 successors: %bb.1, %bb.2
1449 liveins: $vgpr0, $sgpr0, $sgpr1
1451 %0:_(s32) = COPY $sgpr0
1452 %1:_(s32) = COPY $vgpr0
1453 %2:_(s32) = COPY $sgpr1
1454 %3:_(s32) = G_CONSTANT i32 0
1455 %4:_(s1) = G_TRUNC %0
1456 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1463 %6:_(s1) = G_TRUNC %1
1467 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1468 %8:_(s32) = G_SELECT %7, %3, %0
1469 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1474 name: phi_s1_v_v_sbranch
1476 tracksRegLiveness: true
1479 ; FAST-LABEL: name: phi_s1_v_v_sbranch
1481 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1482 ; FAST-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1484 ; FAST-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1485 ; FAST-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1486 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1487 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1488 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1489 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1490 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1491 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1492 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1493 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1494 ; FAST-NEXT: G_BR %bb.2
1497 ; FAST-NEXT: successors: %bb.2(0x80000000)
1499 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1500 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1501 ; FAST-NEXT: G_BR %bb.2
1504 ; FAST-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1505 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1506 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1507 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1508 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1509 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1510 ; GREEDY-LABEL: name: phi_s1_v_v_sbranch
1512 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1513 ; GREEDY-NEXT: liveins: $vgpr0, $vgpr1, $sgpr0
1514 ; GREEDY-NEXT: {{ $}}
1515 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
1516 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
1517 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1518 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1519 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY]](s32)
1520 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1521 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1522 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1523 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1524 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1525 ; GREEDY-NEXT: G_BR %bb.2
1526 ; GREEDY-NEXT: {{ $}}
1527 ; GREEDY-NEXT: bb.1:
1528 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1529 ; GREEDY-NEXT: {{ $}}
1530 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY1]](s32)
1531 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:vgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1532 ; GREEDY-NEXT: G_BR %bb.2
1533 ; GREEDY-NEXT: {{ $}}
1534 ; GREEDY-NEXT: bb.2:
1535 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1536 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:vgpr(s1) = G_TRUNC [[PHI]](s32)
1537 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC3]](s1)
1538 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[C]](s32)
1539 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[COPY3]](s1), [[COPY4]], [[COPY]]
1540 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1542 successors: %bb.1, %bb.2
1543 liveins: $vgpr0, $vgpr1, $sgpr0
1545 %0:_(s32) = COPY $vgpr0
1546 %1:_(s32) = COPY $vgpr1
1547 %2:_(s32) = COPY $sgpr0
1548 %3:_(s32) = G_CONSTANT i32 0
1549 %4:_(s1) = G_TRUNC %0
1550 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1557 %6:_(s1) = G_TRUNC %1
1561 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1562 %8:_(s32) = G_SELECT %7, %3, %0
1563 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1568 name: phi_s1_s_s_sbranch
1570 tracksRegLiveness: true
1573 ; FAST-LABEL: name: phi_s1_s_s_sbranch
1575 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1576 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
1578 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1579 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1580 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1581 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1582 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1583 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1584 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1585 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1586 ; FAST-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1587 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1588 ; FAST-NEXT: G_BR %bb.2
1591 ; FAST-NEXT: successors: %bb.2(0x80000000)
1593 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1594 ; FAST-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1595 ; FAST-NEXT: G_BR %bb.2
1598 ; FAST-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1599 ; FAST-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1600 ; FAST-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1601 ; FAST-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1602 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1603 ; GREEDY-LABEL: name: phi_s1_s_s_sbranch
1605 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1606 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
1607 ; GREEDY-NEXT: {{ $}}
1608 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1609 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1610 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1611 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1612 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
1613 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1614 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1615 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1616 ; GREEDY-NEXT: [[ANYEXT:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC]](s1)
1617 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1618 ; GREEDY-NEXT: G_BR %bb.2
1619 ; GREEDY-NEXT: {{ $}}
1620 ; GREEDY-NEXT: bb.1:
1621 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1622 ; GREEDY-NEXT: {{ $}}
1623 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
1624 ; GREEDY-NEXT: [[ANYEXT1:%[0-9]+]]:sgpr(s32) = G_ANYEXT [[TRUNC2]](s1)
1625 ; GREEDY-NEXT: G_BR %bb.2
1626 ; GREEDY-NEXT: {{ $}}
1627 ; GREEDY-NEXT: bb.2:
1628 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:sgpr(s32) = G_PHI [[ANYEXT]](s32), %bb.0, [[ANYEXT1]](s32), %bb.1
1629 ; GREEDY-NEXT: [[TRUNC3:%[0-9]+]]:sgpr(s1) = G_TRUNC [[PHI]](s32)
1630 ; GREEDY-NEXT: [[ZEXT1:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC3]](s1)
1631 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:sgpr(s32) = G_SELECT [[ZEXT1]](s32), [[C]], [[COPY]]
1632 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1634 successors: %bb.1, %bb.2
1635 liveins: $sgpr0, $sgpr1, $sgpr2
1637 %0:_(s32) = COPY $sgpr0
1638 %1:_(s32) = COPY $sgpr1
1639 %2:_(s32) = COPY $sgpr2
1640 %3:_(s32) = G_CONSTANT i32 0
1641 %4:_(s1) = G_TRUNC %0
1642 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1649 %6:_(s1) = G_TRUNC %1
1653 %7:_(s1) = G_PHI %4, %bb.0, %6, %bb.1
1654 %8:_(s32) = G_SELECT %7, %3, %0
1655 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %8
1660 name: phi_s1_vcc_result_scc_scc_sbranch
1662 tracksRegLiveness: true
1665 ; FAST-LABEL: name: phi_s1_vcc_result_scc_scc_sbranch
1667 ; FAST-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1668 ; FAST-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
1670 ; FAST-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1671 ; FAST-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1672 ; FAST-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1673 ; FAST-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1674 ; FAST-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1675 ; FAST-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1676 ; FAST-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1677 ; FAST-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1678 ; FAST-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1679 ; FAST-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1680 ; FAST-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1681 ; FAST-NEXT: G_BR %bb.2
1684 ; FAST-NEXT: successors: %bb.2(0x80000000)
1686 ; FAST-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1687 ; FAST-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
1688 ; FAST-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1689 ; FAST-NEXT: G_BR %bb.2
1692 ; FAST-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[COPY4]](s1), %bb.1
1693 ; FAST-NEXT: [[C1:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 123
1694 ; FAST-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[C1]](s32)
1695 ; FAST-NEXT: [[C2:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 456
1696 ; FAST-NEXT: [[COPY6:%[0-9]+]]:vgpr(s32) = COPY [[C2]](s32)
1697 ; FAST-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[COPY5]], [[COPY6]]
1698 ; FAST-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1699 ; GREEDY-LABEL: name: phi_s1_vcc_result_scc_scc_sbranch
1701 ; GREEDY-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1702 ; GREEDY-NEXT: liveins: $sgpr0, $sgpr1, $sgpr2
1703 ; GREEDY-NEXT: {{ $}}
1704 ; GREEDY-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
1705 ; GREEDY-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
1706 ; GREEDY-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
1707 ; GREEDY-NEXT: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
1708 ; GREEDY-NEXT: [[ICMP:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
1709 ; GREEDY-NEXT: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP]](s32)
1710 ; GREEDY-NEXT: [[ICMP1:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
1711 ; GREEDY-NEXT: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP1]](s32)
1712 ; GREEDY-NEXT: [[ZEXT:%[0-9]+]]:sgpr(s32) = G_ZEXT [[TRUNC1]](s1)
1713 ; GREEDY-NEXT: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
1714 ; GREEDY-NEXT: G_BRCOND [[ZEXT]](s32), %bb.1
1715 ; GREEDY-NEXT: G_BR %bb.2
1716 ; GREEDY-NEXT: {{ $}}
1717 ; GREEDY-NEXT: bb.1:
1718 ; GREEDY-NEXT: successors: %bb.2(0x80000000)
1719 ; GREEDY-NEXT: {{ $}}
1720 ; GREEDY-NEXT: [[ICMP2:%[0-9]+]]:sgpr(s32) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1721 ; GREEDY-NEXT: [[TRUNC2:%[0-9]+]]:sgpr(s1) = G_TRUNC [[ICMP2]](s32)
1722 ; GREEDY-NEXT: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[TRUNC2]](s1)
1723 ; GREEDY-NEXT: G_BR %bb.2
1724 ; GREEDY-NEXT: {{ $}}
1725 ; GREEDY-NEXT: bb.2:
1726 ; GREEDY-NEXT: [[PHI:%[0-9]+]]:vcc(s1) = G_PHI [[COPY3]](s1), %bb.0, [[COPY4]](s1), %bb.1
1727 ; GREEDY-NEXT: [[C1:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 123
1728 ; GREEDY-NEXT: [[C2:%[0-9]+]]:vgpr(s32) = G_CONSTANT i32 456
1729 ; GREEDY-NEXT: [[SELECT:%[0-9]+]]:vgpr(s32) = G_SELECT [[PHI]](s1), [[C1]], [[C2]]
1730 ; GREEDY-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[SELECT]](s32)
1732 successors: %bb.1, %bb.2
1733 liveins: $sgpr0, $sgpr1, $sgpr2
1735 %0:_(s32) = COPY $sgpr0
1736 %1:_(s32) = COPY $sgpr1
1737 %2:_(s32) = COPY $sgpr2
1738 %3:_(s32) = G_CONSTANT i32 0
1739 %4:_(s1) = G_ICMP intpred(eq), %0, %3
1740 %5:_(s1) = G_ICMP intpred(eq), %2, %3
1747 %6:_(s1) = G_ICMP intpred(eq), %1, %3
1751 %7:vcc(s1) = G_PHI %4, %bb.0, %6, %bb.1
1752 %8:vgpr(s32) = G_CONSTANT i32 123
1753 %9:vgpr(s32) = G_CONSTANT i32 456
1754 %10:vgpr(s32) = G_SELECT %7, %8, %9
1755 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %10