1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -verify-machineinstrs -global-isel-abort=2 %s -o - | FileCheck %s
6 tracksRegLiveness: true
9 ; CHECK-LABEL: name: test_phi_s32
11 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
12 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
15 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
16 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
17 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
18 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
19 ; CHECK-NEXT: G_BR %bb.2
22 ; CHECK-NEXT: successors: %bb.2(0x80000000)
24 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY]], [[COPY]]
25 ; CHECK-NEXT: G_BR %bb.2
28 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s32) = G_PHI [[COPY]](s32), %bb.0, [[ADD]](s32), %bb.1
29 ; CHECK-NEXT: $vgpr0 = COPY [[PHI]](s32)
30 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
32 successors: %bb.1, %bb.2
33 liveins: $vgpr0, $vgpr1
35 %0:_(s32) = COPY $vgpr0
36 %1:_(s32) = COPY $vgpr1
37 %2:_(s32) = G_CONSTANT i32 0
38 %3:_(s1) = G_ICMP intpred(eq), %1, %2
45 %4:_(s32) = G_ADD %0, %0
49 %5:_(s32) = G_PHI %0, %bb.0, %4, %bb.1
51 S_SETPC_B64 undef $sgpr30_sgpr31
56 tracksRegLiveness: true
59 ; CHECK-LABEL: name: test_phi_v2s16
61 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
62 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
64 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
65 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
66 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
67 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
68 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
69 ; CHECK-NEXT: G_BR %bb.2
72 ; CHECK-NEXT: successors: %bb.2(0x80000000)
74 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
75 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
76 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
77 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
78 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C1]](s32)
79 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[BITCAST]], [[BITCAST1]]
80 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[LSHR]], [[LSHR1]]
81 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
82 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C2]]
83 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ADD1]], [[C2]]
84 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
85 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
86 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
87 ; CHECK-NEXT: G_BR %bb.2
90 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<2 x s16>) = G_PHI [[COPY]](<2 x s16>), %bb.0, [[BITCAST2]](<2 x s16>), %bb.1
91 ; CHECK-NEXT: $vgpr0 = COPY [[PHI]](<2 x s16>)
92 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
94 successors: %bb.1, %bb.2
95 liveins: $vgpr0, $vgpr1
97 %0:_(<2 x s16>) = COPY $vgpr0
98 %1:_(s32) = COPY $vgpr1
99 %2:_(s32) = G_CONSTANT i32 0
100 %3:_(s1) = G_ICMP intpred(eq), %1, %2
107 %5:_(<2 x s16>) = G_ADD %0, %0
111 %6:_(<2 x s16>) = G_PHI %0, %bb.0, %5, %bb.1
113 S_SETPC_B64 undef $sgpr30_sgpr31
118 tracksRegLiveness: true
121 ; CHECK-LABEL: name: test_phi_v3s16
123 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
124 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
126 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
127 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
128 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
129 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
130 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
131 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
132 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
133 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
134 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
135 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
136 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C2]]
137 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C]](s32)
138 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY2]], [[C1]](s32)
139 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
140 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
141 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST2]](<2 x s16>)
142 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
143 ; CHECK-NEXT: G_BR %bb.2
146 ; CHECK-NEXT: successors: %bb.2(0x80000000)
148 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[BITCAST]], [[BITCAST]]
149 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[LSHR]], [[LSHR]]
150 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[BITCAST1]], [[BITCAST1]]
151 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
152 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C3]]
153 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ADD1]], [[C3]]
154 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
155 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C4]](s32)
156 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL1]]
157 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
158 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[ADD2]], [[C3]]
159 ; CHECK-NEXT: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
160 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[C5]], [[C4]](s32)
161 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND3]], [[SHL2]]
162 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
163 ; CHECK-NEXT: [[CONCAT_VECTORS1:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
164 ; CHECK-NEXT: G_BR %bb.2
167 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<4 x s16>) = G_PHI [[CONCAT_VECTORS]](<4 x s16>), %bb.0, [[CONCAT_VECTORS1]](<4 x s16>), %bb.1
168 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[PHI]](<4 x s16>)
169 ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
170 ; CHECK-NEXT: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
171 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
172 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(<2 x s16>), [[UV5:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
173 ; CHECK-NEXT: [[BITCAST6:%[0-9]+]]:_(s32) = G_BITCAST [[UV4]](<2 x s16>)
174 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST6]], [[C6]](s32)
175 ; CHECK-NEXT: [[BITCAST7:%[0-9]+]]:_(s32) = G_BITCAST [[UV5]](<2 x s16>)
176 ; CHECK-NEXT: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
177 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s32) = G_AND [[BITCAST5]], [[C7]]
178 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s32) = G_AND [[BITCAST6]], [[C7]]
179 ; CHECK-NEXT: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C6]](s32)
180 ; CHECK-NEXT: [[OR3:%[0-9]+]]:_(s32) = G_OR [[AND4]], [[SHL3]]
181 ; CHECK-NEXT: [[BITCAST8:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR3]](s32)
182 ; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C7]]
183 ; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s32) = G_AND [[BITCAST7]], [[C7]]
184 ; CHECK-NEXT: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C6]](s32)
185 ; CHECK-NEXT: [[OR4:%[0-9]+]]:_(s32) = G_OR [[AND6]], [[SHL4]]
186 ; CHECK-NEXT: [[BITCAST9:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR4]](s32)
187 ; CHECK-NEXT: [[CONCAT_VECTORS2:%[0-9]+]]:_(<6 x s16>) = G_CONCAT_VECTORS [[UV2]](<2 x s16>), [[BITCAST8]](<2 x s16>), [[BITCAST9]](<2 x s16>)
188 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[CONCAT_VECTORS2]](<6 x s16>)
189 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
191 successors: %bb.1, %bb.2
192 liveins: $vgpr0_vgpr1, $vgpr2
194 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
195 %1:_(s32) = COPY $vgpr2
196 %2:_(s32) = G_CONSTANT i32 0
197 %3:_(s1) = G_ICMP intpred(eq), %1, %2
198 %4:_(<3 x s16>) = G_EXTRACT %0, 0
205 %5:_(<3 x s16>) = G_ADD %4, %4
209 %6:_(<3 x s16>) = G_PHI %4, %bb.0, %5, %bb.1
210 %7:_(<3 x s16>) = G_IMPLICIT_DEF
211 %8:_(<6 x s16>) = G_CONCAT_VECTORS %6, %7
212 $vgpr0_vgpr1_vgpr2 = COPY %8
213 S_SETPC_B64 undef $sgpr30_sgpr31
219 tracksRegLiveness: true
222 ; CHECK-LABEL: name: test_phi_v4s16
224 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
225 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
227 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
228 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
229 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
230 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
231 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
232 ; CHECK-NEXT: G_BR %bb.2
235 ; CHECK-NEXT: successors: %bb.2(0x80000000)
237 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
238 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
239 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
240 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
241 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
242 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C1]](s32)
243 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
244 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C1]](s32)
245 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
246 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C1]](s32)
247 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[BITCAST]], [[BITCAST2]]
248 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[LSHR]], [[LSHR2]]
249 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[BITCAST1]], [[BITCAST3]]
250 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[LSHR1]], [[LSHR3]]
251 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
252 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ADD]], [[C2]]
253 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ADD1]], [[C2]]
254 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
255 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
256 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
257 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ADD2]], [[C2]]
258 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[ADD3]], [[C2]]
259 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C1]](s32)
260 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
261 ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
262 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST4]](<2 x s16>), [[BITCAST5]](<2 x s16>)
263 ; CHECK-NEXT: G_BR %bb.2
266 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<4 x s16>) = G_PHI [[COPY]](<4 x s16>), %bb.0, [[CONCAT_VECTORS]](<4 x s16>), %bb.1
267 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](<4 x s16>)
268 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
270 successors: %bb.1, %bb.2
271 liveins: $vgpr0_vgpr1, $vgpr2
273 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
274 %1:_(s32) = COPY $vgpr2
275 %2:_(s32) = G_CONSTANT i32 0
276 %3:_(s1) = G_ICMP intpred(eq), %1, %2
283 %4:_(<4 x s16>) = G_ADD %0, %0
287 %5:_(<4 x s16>) = G_PHI %0, %bb.0, %4, %bb.1
288 $vgpr0_vgpr1 = COPY %5
289 S_SETPC_B64 undef $sgpr30_sgpr31
294 tracksRegLiveness: true
297 ; CHECK-LABEL: name: test_phi_v2s32
299 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
300 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
302 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
303 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
304 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
305 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
306 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
307 ; CHECK-NEXT: G_BR %bb.2
310 ; CHECK-NEXT: successors: %bb.2(0x80000000)
312 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
313 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
314 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV2]]
315 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV3]]
316 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32)
317 ; CHECK-NEXT: G_BR %bb.2
320 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<2 x s32>) = G_PHI [[COPY]](<2 x s32>), %bb.0, [[BUILD_VECTOR]](<2 x s32>), %bb.1
321 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](<2 x s32>)
322 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
324 successors: %bb.1, %bb.2
325 liveins: $vgpr0_vgpr1, $vgpr2
327 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
328 %1:_(s32) = COPY $vgpr2
329 %2:_(s32) = G_CONSTANT i32 0
330 %3:_(s1) = G_ICMP intpred(eq), %1, %2
337 %4:_(<2 x s32>) = G_ADD %0, %0
341 %5:_(<2 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
342 $vgpr0_vgpr1 = COPY %5
343 S_SETPC_B64 undef $sgpr30_sgpr31
348 tracksRegLiveness: true
351 ; CHECK-LABEL: name: test_phi_v3s32
353 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
354 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
356 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
357 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
358 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
359 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
360 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
361 ; CHECK-NEXT: G_BR %bb.2
364 ; CHECK-NEXT: successors: %bb.2(0x80000000)
366 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
367 ; CHECK-NEXT: [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
368 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV3]]
369 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV4]]
370 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV5]]
371 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32)
372 ; CHECK-NEXT: G_BR %bb.2
375 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<3 x s32>) = G_PHI [[COPY]](<3 x s32>), %bb.0, [[BUILD_VECTOR]](<3 x s32>), %bb.1
376 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[PHI]](<3 x s32>)
377 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
379 successors: %bb.1, %bb.2
380 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
382 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
383 %1:_(s32) = COPY $vgpr3
384 %2:_(s32) = G_CONSTANT i32 0
385 %3:_(s1) = G_ICMP intpred(eq), %1, %2
392 %4:_(<3 x s32>) = G_ADD %0, %0
396 %5:_(<3 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
397 $vgpr0_vgpr1_vgpr2 = COPY %5
398 S_SETPC_B64 undef $sgpr30_sgpr31
403 tracksRegLiveness: true
406 ; CHECK-LABEL: name: test_phi_v4s32
408 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
409 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
411 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
412 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
413 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
414 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
415 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
416 ; CHECK-NEXT: G_BR %bb.2
419 ; CHECK-NEXT: successors: %bb.2(0x80000000)
421 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
422 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
423 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV4]]
424 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV5]]
425 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV6]]
426 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[UV3]], [[UV7]]
427 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32), [[ADD3]](s32)
428 ; CHECK-NEXT: G_BR %bb.2
431 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<4 x s32>) = G_PHI [[COPY]](<4 x s32>), %bb.0, [[BUILD_VECTOR]](<4 x s32>), %bb.1
432 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[PHI]](<4 x s32>)
433 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
435 successors: %bb.1, %bb.2
436 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
438 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
439 %1:_(s32) = COPY $vgpr4
440 %2:_(s32) = G_CONSTANT i32 0
441 %3:_(s1) = G_ICMP intpred(eq), %1, %2
448 %4:_(<4 x s32>) = G_ADD %0, %0
452 %5:_(<4 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
453 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
454 S_SETPC_B64 undef $sgpr30_sgpr31
459 tracksRegLiveness: true
462 ; CHECK-LABEL: name: test_phi_v8s32
464 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
465 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
467 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
468 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr8
469 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
470 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
471 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
472 ; CHECK-NEXT: G_BR %bb.2
475 ; CHECK-NEXT: successors: %bb.2(0x80000000)
477 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<8 x s32>)
478 ; CHECK-NEXT: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<8 x s32>)
479 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV8]]
480 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV9]]
481 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV10]]
482 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[UV3]], [[UV11]]
483 ; CHECK-NEXT: [[ADD4:%[0-9]+]]:_(s32) = G_ADD [[UV4]], [[UV12]]
484 ; CHECK-NEXT: [[ADD5:%[0-9]+]]:_(s32) = G_ADD [[UV5]], [[UV13]]
485 ; CHECK-NEXT: [[ADD6:%[0-9]+]]:_(s32) = G_ADD [[UV6]], [[UV14]]
486 ; CHECK-NEXT: [[ADD7:%[0-9]+]]:_(s32) = G_ADD [[UV7]], [[UV15]]
487 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32), [[ADD3]](s32), [[ADD4]](s32), [[ADD5]](s32), [[ADD6]](s32), [[ADD7]](s32)
488 ; CHECK-NEXT: G_BR %bb.2
491 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<8 x s32>) = G_PHI [[COPY]](<8 x s32>), %bb.0, [[BUILD_VECTOR]](<8 x s32>), %bb.1
492 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[PHI]](<8 x s32>)
493 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
495 successors: %bb.1, %bb.2
496 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
498 %0:_(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
499 %1:_(s32) = COPY $vgpr8
500 %2:_(s32) = G_CONSTANT i32 0
501 %3:_(s1) = G_ICMP intpred(eq), %1, %2
508 %4:_(<8 x s32>) = G_ADD %0, %0
512 %5:_(<8 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
513 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
514 S_SETPC_B64 undef $sgpr30_sgpr31
518 name: test_phi_v16s32
519 tracksRegLiveness: true
522 ; CHECK-LABEL: name: test_phi_v16s32
524 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
525 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
527 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
528 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr4
529 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
530 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
531 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
532 ; CHECK-NEXT: G_BR %bb.2
535 ; CHECK-NEXT: successors: %bb.2(0x80000000)
537 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
538 ; CHECK-NEXT: [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
539 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV16]]
540 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV17]]
541 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV18]]
542 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[UV3]], [[UV19]]
543 ; CHECK-NEXT: [[ADD4:%[0-9]+]]:_(s32) = G_ADD [[UV4]], [[UV20]]
544 ; CHECK-NEXT: [[ADD5:%[0-9]+]]:_(s32) = G_ADD [[UV5]], [[UV21]]
545 ; CHECK-NEXT: [[ADD6:%[0-9]+]]:_(s32) = G_ADD [[UV6]], [[UV22]]
546 ; CHECK-NEXT: [[ADD7:%[0-9]+]]:_(s32) = G_ADD [[UV7]], [[UV23]]
547 ; CHECK-NEXT: [[ADD8:%[0-9]+]]:_(s32) = G_ADD [[UV8]], [[UV24]]
548 ; CHECK-NEXT: [[ADD9:%[0-9]+]]:_(s32) = G_ADD [[UV9]], [[UV25]]
549 ; CHECK-NEXT: [[ADD10:%[0-9]+]]:_(s32) = G_ADD [[UV10]], [[UV26]]
550 ; CHECK-NEXT: [[ADD11:%[0-9]+]]:_(s32) = G_ADD [[UV11]], [[UV27]]
551 ; CHECK-NEXT: [[ADD12:%[0-9]+]]:_(s32) = G_ADD [[UV12]], [[UV28]]
552 ; CHECK-NEXT: [[ADD13:%[0-9]+]]:_(s32) = G_ADD [[UV13]], [[UV29]]
553 ; CHECK-NEXT: [[ADD14:%[0-9]+]]:_(s32) = G_ADD [[UV14]], [[UV30]]
554 ; CHECK-NEXT: [[ADD15:%[0-9]+]]:_(s32) = G_ADD [[UV15]], [[UV31]]
555 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32), [[ADD3]](s32), [[ADD4]](s32), [[ADD5]](s32), [[ADD6]](s32), [[ADD7]](s32), [[ADD8]](s32), [[ADD9]](s32), [[ADD10]](s32), [[ADD11]](s32), [[ADD12]](s32), [[ADD13]](s32), [[ADD14]](s32), [[ADD15]](s32)
556 ; CHECK-NEXT: G_BR %bb.2
559 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<16 x s32>) = G_PHI [[DEF]](<16 x s32>), %bb.0, [[BUILD_VECTOR]](<16 x s32>), %bb.1
560 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](<16 x s32>)
562 successors: %bb.1, %bb.2
563 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
565 %0:_(<16 x s32>) = G_IMPLICIT_DEF
566 %1:_(s32) = COPY $vgpr4
567 %2:_(s32) = G_CONSTANT i32 0
568 %3:_(s1) = G_ICMP intpred(eq), %1, %2
575 %4:_(<16 x s32>) = G_ADD %0, %0
579 %5:_(<16 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
580 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %5
585 name: test_phi_v32s32
586 tracksRegLiveness: true
589 ; CHECK-LABEL: name: test_phi_v32s32
591 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
592 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
594 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<32 x s32>) = G_IMPLICIT_DEF
595 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr4
596 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
597 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
598 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
599 ; CHECK-NEXT: G_BR %bb.2
602 ; CHECK-NEXT: successors: %bb.2(0x80000000)
604 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32), [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<32 x s32>)
605 ; CHECK-NEXT: [[UV32:%[0-9]+]]:_(s32), [[UV33:%[0-9]+]]:_(s32), [[UV34:%[0-9]+]]:_(s32), [[UV35:%[0-9]+]]:_(s32), [[UV36:%[0-9]+]]:_(s32), [[UV37:%[0-9]+]]:_(s32), [[UV38:%[0-9]+]]:_(s32), [[UV39:%[0-9]+]]:_(s32), [[UV40:%[0-9]+]]:_(s32), [[UV41:%[0-9]+]]:_(s32), [[UV42:%[0-9]+]]:_(s32), [[UV43:%[0-9]+]]:_(s32), [[UV44:%[0-9]+]]:_(s32), [[UV45:%[0-9]+]]:_(s32), [[UV46:%[0-9]+]]:_(s32), [[UV47:%[0-9]+]]:_(s32), [[UV48:%[0-9]+]]:_(s32), [[UV49:%[0-9]+]]:_(s32), [[UV50:%[0-9]+]]:_(s32), [[UV51:%[0-9]+]]:_(s32), [[UV52:%[0-9]+]]:_(s32), [[UV53:%[0-9]+]]:_(s32), [[UV54:%[0-9]+]]:_(s32), [[UV55:%[0-9]+]]:_(s32), [[UV56:%[0-9]+]]:_(s32), [[UV57:%[0-9]+]]:_(s32), [[UV58:%[0-9]+]]:_(s32), [[UV59:%[0-9]+]]:_(s32), [[UV60:%[0-9]+]]:_(s32), [[UV61:%[0-9]+]]:_(s32), [[UV62:%[0-9]+]]:_(s32), [[UV63:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<32 x s32>)
606 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV32]]
607 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV33]]
608 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV34]]
609 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[UV3]], [[UV35]]
610 ; CHECK-NEXT: [[ADD4:%[0-9]+]]:_(s32) = G_ADD [[UV4]], [[UV36]]
611 ; CHECK-NEXT: [[ADD5:%[0-9]+]]:_(s32) = G_ADD [[UV5]], [[UV37]]
612 ; CHECK-NEXT: [[ADD6:%[0-9]+]]:_(s32) = G_ADD [[UV6]], [[UV38]]
613 ; CHECK-NEXT: [[ADD7:%[0-9]+]]:_(s32) = G_ADD [[UV7]], [[UV39]]
614 ; CHECK-NEXT: [[ADD8:%[0-9]+]]:_(s32) = G_ADD [[UV8]], [[UV40]]
615 ; CHECK-NEXT: [[ADD9:%[0-9]+]]:_(s32) = G_ADD [[UV9]], [[UV41]]
616 ; CHECK-NEXT: [[ADD10:%[0-9]+]]:_(s32) = G_ADD [[UV10]], [[UV42]]
617 ; CHECK-NEXT: [[ADD11:%[0-9]+]]:_(s32) = G_ADD [[UV11]], [[UV43]]
618 ; CHECK-NEXT: [[ADD12:%[0-9]+]]:_(s32) = G_ADD [[UV12]], [[UV44]]
619 ; CHECK-NEXT: [[ADD13:%[0-9]+]]:_(s32) = G_ADD [[UV13]], [[UV45]]
620 ; CHECK-NEXT: [[ADD14:%[0-9]+]]:_(s32) = G_ADD [[UV14]], [[UV46]]
621 ; CHECK-NEXT: [[ADD15:%[0-9]+]]:_(s32) = G_ADD [[UV15]], [[UV47]]
622 ; CHECK-NEXT: [[ADD16:%[0-9]+]]:_(s32) = G_ADD [[UV16]], [[UV48]]
623 ; CHECK-NEXT: [[ADD17:%[0-9]+]]:_(s32) = G_ADD [[UV17]], [[UV49]]
624 ; CHECK-NEXT: [[ADD18:%[0-9]+]]:_(s32) = G_ADD [[UV18]], [[UV50]]
625 ; CHECK-NEXT: [[ADD19:%[0-9]+]]:_(s32) = G_ADD [[UV19]], [[UV51]]
626 ; CHECK-NEXT: [[ADD20:%[0-9]+]]:_(s32) = G_ADD [[UV20]], [[UV52]]
627 ; CHECK-NEXT: [[ADD21:%[0-9]+]]:_(s32) = G_ADD [[UV21]], [[UV53]]
628 ; CHECK-NEXT: [[ADD22:%[0-9]+]]:_(s32) = G_ADD [[UV22]], [[UV54]]
629 ; CHECK-NEXT: [[ADD23:%[0-9]+]]:_(s32) = G_ADD [[UV23]], [[UV55]]
630 ; CHECK-NEXT: [[ADD24:%[0-9]+]]:_(s32) = G_ADD [[UV24]], [[UV56]]
631 ; CHECK-NEXT: [[ADD25:%[0-9]+]]:_(s32) = G_ADD [[UV25]], [[UV57]]
632 ; CHECK-NEXT: [[ADD26:%[0-9]+]]:_(s32) = G_ADD [[UV26]], [[UV58]]
633 ; CHECK-NEXT: [[ADD27:%[0-9]+]]:_(s32) = G_ADD [[UV27]], [[UV59]]
634 ; CHECK-NEXT: [[ADD28:%[0-9]+]]:_(s32) = G_ADD [[UV28]], [[UV60]]
635 ; CHECK-NEXT: [[ADD29:%[0-9]+]]:_(s32) = G_ADD [[UV29]], [[UV61]]
636 ; CHECK-NEXT: [[ADD30:%[0-9]+]]:_(s32) = G_ADD [[UV30]], [[UV62]]
637 ; CHECK-NEXT: [[ADD31:%[0-9]+]]:_(s32) = G_ADD [[UV31]], [[UV63]]
638 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<32 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32), [[ADD3]](s32), [[ADD4]](s32), [[ADD5]](s32), [[ADD6]](s32), [[ADD7]](s32), [[ADD8]](s32), [[ADD9]](s32), [[ADD10]](s32), [[ADD11]](s32), [[ADD12]](s32), [[ADD13]](s32), [[ADD14]](s32), [[ADD15]](s32), [[ADD16]](s32), [[ADD17]](s32), [[ADD18]](s32), [[ADD19]](s32), [[ADD20]](s32), [[ADD21]](s32), [[ADD22]](s32), [[ADD23]](s32), [[ADD24]](s32), [[ADD25]](s32), [[ADD26]](s32), [[ADD27]](s32), [[ADD28]](s32), [[ADD29]](s32), [[ADD30]](s32), [[ADD31]](s32)
639 ; CHECK-NEXT: G_BR %bb.2
642 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<32 x s32>) = G_PHI [[DEF]](<32 x s32>), %bb.0, [[BUILD_VECTOR]](<32 x s32>), %bb.1
643 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[PHI]](<32 x s32>)
645 successors: %bb.1, %bb.2
646 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
648 %0:_(<32 x s32>) = G_IMPLICIT_DEF
649 %1:_(s32) = COPY $vgpr4
650 %2:_(s32) = G_CONSTANT i32 0
651 %3:_(s1) = G_ICMP intpred(eq), %1, %2
658 %4:_(<32 x s32>) = G_ADD %0, %0
662 %5:_(<32 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
663 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %5
668 name: test_phi_v64s32
669 tracksRegLiveness: true
672 ; CHECK-LABEL: name: test_phi_v64s32
674 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
675 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
677 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
678 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr4
679 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
680 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY]](s32), [[C]]
681 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
682 ; CHECK-NEXT: G_BR %bb.2
685 ; CHECK-NEXT: successors: %bb.2(0x80000000)
687 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
688 ; CHECK-NEXT: [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
689 ; CHECK-NEXT: [[UV32:%[0-9]+]]:_(s32), [[UV33:%[0-9]+]]:_(s32), [[UV34:%[0-9]+]]:_(s32), [[UV35:%[0-9]+]]:_(s32), [[UV36:%[0-9]+]]:_(s32), [[UV37:%[0-9]+]]:_(s32), [[UV38:%[0-9]+]]:_(s32), [[UV39:%[0-9]+]]:_(s32), [[UV40:%[0-9]+]]:_(s32), [[UV41:%[0-9]+]]:_(s32), [[UV42:%[0-9]+]]:_(s32), [[UV43:%[0-9]+]]:_(s32), [[UV44:%[0-9]+]]:_(s32), [[UV45:%[0-9]+]]:_(s32), [[UV46:%[0-9]+]]:_(s32), [[UV47:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
690 ; CHECK-NEXT: [[UV48:%[0-9]+]]:_(s32), [[UV49:%[0-9]+]]:_(s32), [[UV50:%[0-9]+]]:_(s32), [[UV51:%[0-9]+]]:_(s32), [[UV52:%[0-9]+]]:_(s32), [[UV53:%[0-9]+]]:_(s32), [[UV54:%[0-9]+]]:_(s32), [[UV55:%[0-9]+]]:_(s32), [[UV56:%[0-9]+]]:_(s32), [[UV57:%[0-9]+]]:_(s32), [[UV58:%[0-9]+]]:_(s32), [[UV59:%[0-9]+]]:_(s32), [[UV60:%[0-9]+]]:_(s32), [[UV61:%[0-9]+]]:_(s32), [[UV62:%[0-9]+]]:_(s32), [[UV63:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
691 ; CHECK-NEXT: [[UV64:%[0-9]+]]:_(s32), [[UV65:%[0-9]+]]:_(s32), [[UV66:%[0-9]+]]:_(s32), [[UV67:%[0-9]+]]:_(s32), [[UV68:%[0-9]+]]:_(s32), [[UV69:%[0-9]+]]:_(s32), [[UV70:%[0-9]+]]:_(s32), [[UV71:%[0-9]+]]:_(s32), [[UV72:%[0-9]+]]:_(s32), [[UV73:%[0-9]+]]:_(s32), [[UV74:%[0-9]+]]:_(s32), [[UV75:%[0-9]+]]:_(s32), [[UV76:%[0-9]+]]:_(s32), [[UV77:%[0-9]+]]:_(s32), [[UV78:%[0-9]+]]:_(s32), [[UV79:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
692 ; CHECK-NEXT: [[UV80:%[0-9]+]]:_(s32), [[UV81:%[0-9]+]]:_(s32), [[UV82:%[0-9]+]]:_(s32), [[UV83:%[0-9]+]]:_(s32), [[UV84:%[0-9]+]]:_(s32), [[UV85:%[0-9]+]]:_(s32), [[UV86:%[0-9]+]]:_(s32), [[UV87:%[0-9]+]]:_(s32), [[UV88:%[0-9]+]]:_(s32), [[UV89:%[0-9]+]]:_(s32), [[UV90:%[0-9]+]]:_(s32), [[UV91:%[0-9]+]]:_(s32), [[UV92:%[0-9]+]]:_(s32), [[UV93:%[0-9]+]]:_(s32), [[UV94:%[0-9]+]]:_(s32), [[UV95:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
693 ; CHECK-NEXT: [[UV96:%[0-9]+]]:_(s32), [[UV97:%[0-9]+]]:_(s32), [[UV98:%[0-9]+]]:_(s32), [[UV99:%[0-9]+]]:_(s32), [[UV100:%[0-9]+]]:_(s32), [[UV101:%[0-9]+]]:_(s32), [[UV102:%[0-9]+]]:_(s32), [[UV103:%[0-9]+]]:_(s32), [[UV104:%[0-9]+]]:_(s32), [[UV105:%[0-9]+]]:_(s32), [[UV106:%[0-9]+]]:_(s32), [[UV107:%[0-9]+]]:_(s32), [[UV108:%[0-9]+]]:_(s32), [[UV109:%[0-9]+]]:_(s32), [[UV110:%[0-9]+]]:_(s32), [[UV111:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
694 ; CHECK-NEXT: [[UV112:%[0-9]+]]:_(s32), [[UV113:%[0-9]+]]:_(s32), [[UV114:%[0-9]+]]:_(s32), [[UV115:%[0-9]+]]:_(s32), [[UV116:%[0-9]+]]:_(s32), [[UV117:%[0-9]+]]:_(s32), [[UV118:%[0-9]+]]:_(s32), [[UV119:%[0-9]+]]:_(s32), [[UV120:%[0-9]+]]:_(s32), [[UV121:%[0-9]+]]:_(s32), [[UV122:%[0-9]+]]:_(s32), [[UV123:%[0-9]+]]:_(s32), [[UV124:%[0-9]+]]:_(s32), [[UV125:%[0-9]+]]:_(s32), [[UV126:%[0-9]+]]:_(s32), [[UV127:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
695 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[UV]], [[UV64]]
696 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[UV1]], [[UV65]]
697 ; CHECK-NEXT: [[ADD2:%[0-9]+]]:_(s32) = G_ADD [[UV2]], [[UV66]]
698 ; CHECK-NEXT: [[ADD3:%[0-9]+]]:_(s32) = G_ADD [[UV3]], [[UV67]]
699 ; CHECK-NEXT: [[ADD4:%[0-9]+]]:_(s32) = G_ADD [[UV4]], [[UV68]]
700 ; CHECK-NEXT: [[ADD5:%[0-9]+]]:_(s32) = G_ADD [[UV5]], [[UV69]]
701 ; CHECK-NEXT: [[ADD6:%[0-9]+]]:_(s32) = G_ADD [[UV6]], [[UV70]]
702 ; CHECK-NEXT: [[ADD7:%[0-9]+]]:_(s32) = G_ADD [[UV7]], [[UV71]]
703 ; CHECK-NEXT: [[ADD8:%[0-9]+]]:_(s32) = G_ADD [[UV8]], [[UV72]]
704 ; CHECK-NEXT: [[ADD9:%[0-9]+]]:_(s32) = G_ADD [[UV9]], [[UV73]]
705 ; CHECK-NEXT: [[ADD10:%[0-9]+]]:_(s32) = G_ADD [[UV10]], [[UV74]]
706 ; CHECK-NEXT: [[ADD11:%[0-9]+]]:_(s32) = G_ADD [[UV11]], [[UV75]]
707 ; CHECK-NEXT: [[ADD12:%[0-9]+]]:_(s32) = G_ADD [[UV12]], [[UV76]]
708 ; CHECK-NEXT: [[ADD13:%[0-9]+]]:_(s32) = G_ADD [[UV13]], [[UV77]]
709 ; CHECK-NEXT: [[ADD14:%[0-9]+]]:_(s32) = G_ADD [[UV14]], [[UV78]]
710 ; CHECK-NEXT: [[ADD15:%[0-9]+]]:_(s32) = G_ADD [[UV15]], [[UV79]]
711 ; CHECK-NEXT: [[ADD16:%[0-9]+]]:_(s32) = G_ADD [[UV16]], [[UV80]]
712 ; CHECK-NEXT: [[ADD17:%[0-9]+]]:_(s32) = G_ADD [[UV17]], [[UV81]]
713 ; CHECK-NEXT: [[ADD18:%[0-9]+]]:_(s32) = G_ADD [[UV18]], [[UV82]]
714 ; CHECK-NEXT: [[ADD19:%[0-9]+]]:_(s32) = G_ADD [[UV19]], [[UV83]]
715 ; CHECK-NEXT: [[ADD20:%[0-9]+]]:_(s32) = G_ADD [[UV20]], [[UV84]]
716 ; CHECK-NEXT: [[ADD21:%[0-9]+]]:_(s32) = G_ADD [[UV21]], [[UV85]]
717 ; CHECK-NEXT: [[ADD22:%[0-9]+]]:_(s32) = G_ADD [[UV22]], [[UV86]]
718 ; CHECK-NEXT: [[ADD23:%[0-9]+]]:_(s32) = G_ADD [[UV23]], [[UV87]]
719 ; CHECK-NEXT: [[ADD24:%[0-9]+]]:_(s32) = G_ADD [[UV24]], [[UV88]]
720 ; CHECK-NEXT: [[ADD25:%[0-9]+]]:_(s32) = G_ADD [[UV25]], [[UV89]]
721 ; CHECK-NEXT: [[ADD26:%[0-9]+]]:_(s32) = G_ADD [[UV26]], [[UV90]]
722 ; CHECK-NEXT: [[ADD27:%[0-9]+]]:_(s32) = G_ADD [[UV27]], [[UV91]]
723 ; CHECK-NEXT: [[ADD28:%[0-9]+]]:_(s32) = G_ADD [[UV28]], [[UV92]]
724 ; CHECK-NEXT: [[ADD29:%[0-9]+]]:_(s32) = G_ADD [[UV29]], [[UV93]]
725 ; CHECK-NEXT: [[ADD30:%[0-9]+]]:_(s32) = G_ADD [[UV30]], [[UV94]]
726 ; CHECK-NEXT: [[ADD31:%[0-9]+]]:_(s32) = G_ADD [[UV31]], [[UV95]]
727 ; CHECK-NEXT: [[ADD32:%[0-9]+]]:_(s32) = G_ADD [[UV32]], [[UV96]]
728 ; CHECK-NEXT: [[ADD33:%[0-9]+]]:_(s32) = G_ADD [[UV33]], [[UV97]]
729 ; CHECK-NEXT: [[ADD34:%[0-9]+]]:_(s32) = G_ADD [[UV34]], [[UV98]]
730 ; CHECK-NEXT: [[ADD35:%[0-9]+]]:_(s32) = G_ADD [[UV35]], [[UV99]]
731 ; CHECK-NEXT: [[ADD36:%[0-9]+]]:_(s32) = G_ADD [[UV36]], [[UV100]]
732 ; CHECK-NEXT: [[ADD37:%[0-9]+]]:_(s32) = G_ADD [[UV37]], [[UV101]]
733 ; CHECK-NEXT: [[ADD38:%[0-9]+]]:_(s32) = G_ADD [[UV38]], [[UV102]]
734 ; CHECK-NEXT: [[ADD39:%[0-9]+]]:_(s32) = G_ADD [[UV39]], [[UV103]]
735 ; CHECK-NEXT: [[ADD40:%[0-9]+]]:_(s32) = G_ADD [[UV40]], [[UV104]]
736 ; CHECK-NEXT: [[ADD41:%[0-9]+]]:_(s32) = G_ADD [[UV41]], [[UV105]]
737 ; CHECK-NEXT: [[ADD42:%[0-9]+]]:_(s32) = G_ADD [[UV42]], [[UV106]]
738 ; CHECK-NEXT: [[ADD43:%[0-9]+]]:_(s32) = G_ADD [[UV43]], [[UV107]]
739 ; CHECK-NEXT: [[ADD44:%[0-9]+]]:_(s32) = G_ADD [[UV44]], [[UV108]]
740 ; CHECK-NEXT: [[ADD45:%[0-9]+]]:_(s32) = G_ADD [[UV45]], [[UV109]]
741 ; CHECK-NEXT: [[ADD46:%[0-9]+]]:_(s32) = G_ADD [[UV46]], [[UV110]]
742 ; CHECK-NEXT: [[ADD47:%[0-9]+]]:_(s32) = G_ADD [[UV47]], [[UV111]]
743 ; CHECK-NEXT: [[ADD48:%[0-9]+]]:_(s32) = G_ADD [[UV48]], [[UV112]]
744 ; CHECK-NEXT: [[ADD49:%[0-9]+]]:_(s32) = G_ADD [[UV49]], [[UV113]]
745 ; CHECK-NEXT: [[ADD50:%[0-9]+]]:_(s32) = G_ADD [[UV50]], [[UV114]]
746 ; CHECK-NEXT: [[ADD51:%[0-9]+]]:_(s32) = G_ADD [[UV51]], [[UV115]]
747 ; CHECK-NEXT: [[ADD52:%[0-9]+]]:_(s32) = G_ADD [[UV52]], [[UV116]]
748 ; CHECK-NEXT: [[ADD53:%[0-9]+]]:_(s32) = G_ADD [[UV53]], [[UV117]]
749 ; CHECK-NEXT: [[ADD54:%[0-9]+]]:_(s32) = G_ADD [[UV54]], [[UV118]]
750 ; CHECK-NEXT: [[ADD55:%[0-9]+]]:_(s32) = G_ADD [[UV55]], [[UV119]]
751 ; CHECK-NEXT: [[ADD56:%[0-9]+]]:_(s32) = G_ADD [[UV56]], [[UV120]]
752 ; CHECK-NEXT: [[ADD57:%[0-9]+]]:_(s32) = G_ADD [[UV57]], [[UV121]]
753 ; CHECK-NEXT: [[ADD58:%[0-9]+]]:_(s32) = G_ADD [[UV58]], [[UV122]]
754 ; CHECK-NEXT: [[ADD59:%[0-9]+]]:_(s32) = G_ADD [[UV59]], [[UV123]]
755 ; CHECK-NEXT: [[ADD60:%[0-9]+]]:_(s32) = G_ADD [[UV60]], [[UV124]]
756 ; CHECK-NEXT: [[ADD61:%[0-9]+]]:_(s32) = G_ADD [[UV61]], [[UV125]]
757 ; CHECK-NEXT: [[ADD62:%[0-9]+]]:_(s32) = G_ADD [[UV62]], [[UV126]]
758 ; CHECK-NEXT: [[ADD63:%[0-9]+]]:_(s32) = G_ADD [[UV63]], [[UV127]]
759 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[ADD]](s32), [[ADD1]](s32), [[ADD2]](s32), [[ADD3]](s32), [[ADD4]](s32), [[ADD5]](s32), [[ADD6]](s32), [[ADD7]](s32), [[ADD8]](s32), [[ADD9]](s32), [[ADD10]](s32), [[ADD11]](s32), [[ADD12]](s32), [[ADD13]](s32), [[ADD14]](s32), [[ADD15]](s32)
760 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[ADD16]](s32), [[ADD17]](s32), [[ADD18]](s32), [[ADD19]](s32), [[ADD20]](s32), [[ADD21]](s32), [[ADD22]](s32), [[ADD23]](s32), [[ADD24]](s32), [[ADD25]](s32), [[ADD26]](s32), [[ADD27]](s32), [[ADD28]](s32), [[ADD29]](s32), [[ADD30]](s32), [[ADD31]](s32)
761 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[ADD32]](s32), [[ADD33]](s32), [[ADD34]](s32), [[ADD35]](s32), [[ADD36]](s32), [[ADD37]](s32), [[ADD38]](s32), [[ADD39]](s32), [[ADD40]](s32), [[ADD41]](s32), [[ADD42]](s32), [[ADD43]](s32), [[ADD44]](s32), [[ADD45]](s32), [[ADD46]](s32), [[ADD47]](s32)
762 ; CHECK-NEXT: [[BUILD_VECTOR3:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[ADD48]](s32), [[ADD49]](s32), [[ADD50]](s32), [[ADD51]](s32), [[ADD52]](s32), [[ADD53]](s32), [[ADD54]](s32), [[ADD55]](s32), [[ADD56]](s32), [[ADD57]](s32), [[ADD58]](s32), [[ADD59]](s32), [[ADD60]](s32), [[ADD61]](s32), [[ADD62]](s32), [[ADD63]](s32)
763 ; CHECK-NEXT: G_BR %bb.2
766 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<16 x s32>) = G_PHI [[DEF]](<16 x s32>), %bb.0, [[BUILD_VECTOR]](<16 x s32>), %bb.1
767 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:_(<16 x s32>) = G_PHI [[DEF]](<16 x s32>), %bb.0, [[BUILD_VECTOR1]](<16 x s32>), %bb.1
768 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:_(<16 x s32>) = G_PHI [[DEF]](<16 x s32>), %bb.0, [[BUILD_VECTOR2]](<16 x s32>), %bb.1
769 ; CHECK-NEXT: [[PHI3:%[0-9]+]]:_(<16 x s32>) = G_PHI [[DEF]](<16 x s32>), %bb.0, [[BUILD_VECTOR3]](<16 x s32>), %bb.1
770 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<64 x s32>) = G_CONCAT_VECTORS [[PHI]](<16 x s32>), [[PHI1]](<16 x s32>), [[PHI2]](<16 x s32>), [[PHI3]](<16 x s32>)
771 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31, implicit [[CONCAT_VECTORS]](<64 x s32>)
773 successors: %bb.1, %bb.2
774 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
776 %0:_(<64 x s32>) = G_IMPLICIT_DEF
777 %1:_(s32) = COPY $vgpr4
778 %2:_(s32) = G_CONSTANT i32 0
779 %3:_(s1) = G_ICMP intpred(eq), %1, %2
786 %4:_(<64 x s32>) = G_ADD %0, %0
790 %5:_(<64 x s32>) = G_PHI %0, %bb.0, %4, %bb.1
791 S_SETPC_B64 undef $sgpr30_sgpr31, implicit %5
797 tracksRegLiveness: true
800 ; CHECK-LABEL: name: test_phi_s64
802 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
803 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
805 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
806 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
807 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
808 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
809 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
810 ; CHECK-NEXT: G_BR %bb.2
813 ; CHECK-NEXT: successors: %bb.2(0x80000000)
815 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
816 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
817 ; CHECK-NEXT: [[UADDO:%[0-9]+]]:_(s32), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[UV]], [[UV2]]
818 ; CHECK-NEXT: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[UV1]], [[UV3]], [[UADDO1]]
819 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO]](s32), [[UADDE]](s32)
820 ; CHECK-NEXT: G_BR %bb.2
823 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s64) = G_PHI [[COPY]](s64), %bb.0, [[MV]](s64), %bb.1
824 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](s64)
825 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
827 successors: %bb.1, %bb.2
828 liveins: $vgpr0_vgpr1, $vgpr2
830 %0:_(s64) = COPY $vgpr0_vgpr1
831 %1:_(s32) = COPY $vgpr2
832 %2:_(s32) = G_CONSTANT i32 0
833 %3:_(s1) = G_ICMP intpred(eq), %1, %2
840 %4:_(s64) = G_ADD %0, %0
844 %5:_(s64) = G_PHI %0, %bb.0, %4, %bb.1
845 $vgpr0_vgpr1 = COPY %5
846 S_SETPC_B64 undef $sgpr30_sgpr31
851 tracksRegLiveness: true
854 ; CHECK-LABEL: name: test_phi_v2s64
856 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
857 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
859 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
860 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
861 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
862 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
863 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
864 ; CHECK-NEXT: G_BR %bb.2
867 ; CHECK-NEXT: successors: %bb.2(0x80000000)
869 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
870 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
871 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
872 ; CHECK-NEXT: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](s64)
873 ; CHECK-NEXT: [[UADDO:%[0-9]+]]:_(s32), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[UV4]], [[UV6]]
874 ; CHECK-NEXT: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[UV5]], [[UV7]], [[UADDO1]]
875 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO]](s32), [[UADDE]](s32)
876 ; CHECK-NEXT: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
877 ; CHECK-NEXT: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV3]](s64)
878 ; CHECK-NEXT: [[UADDO2:%[0-9]+]]:_(s32), [[UADDO3:%[0-9]+]]:_(s1) = G_UADDO [[UV8]], [[UV10]]
879 ; CHECK-NEXT: [[UADDE2:%[0-9]+]]:_(s32), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[UV9]], [[UV11]], [[UADDO3]]
880 ; CHECK-NEXT: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO2]](s32), [[UADDE2]](s32)
881 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[MV]](s64), [[MV1]](s64)
882 ; CHECK-NEXT: G_BR %bb.2
885 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<2 x s64>) = G_PHI [[COPY]](<2 x s64>), %bb.0, [[BUILD_VECTOR]](<2 x s64>), %bb.1
886 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[PHI]](<2 x s64>)
887 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
889 successors: %bb.1, %bb.2
890 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
892 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
893 %1:_(s32) = COPY $vgpr4
894 %2:_(s32) = G_CONSTANT i32 0
895 %3:_(s1) = G_ICMP intpred(eq), %1, %2
902 %4:_(<2 x s64>) = G_ADD %0, %0
906 %5:_(<2 x s64>) = G_PHI %0, %bb.0, %4, %bb.1
907 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
908 S_SETPC_B64 undef $sgpr30_sgpr31
913 tracksRegLiveness: true
916 ; CHECK-LABEL: name: test_phi_v3s64
918 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
919 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
921 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
922 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr8
923 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
924 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
925 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64), [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<4 x s64>)
926 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s64>) = G_BUILD_VECTOR [[UV]](s64), [[UV1]](s64), [[UV2]](s64)
927 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
928 ; CHECK-NEXT: G_BR %bb.2
931 ; CHECK-NEXT: successors: %bb.2(0x80000000)
933 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
934 ; CHECK-NEXT: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV]](s64)
935 ; CHECK-NEXT: [[UADDO:%[0-9]+]]:_(s32), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[UV4]], [[UV6]]
936 ; CHECK-NEXT: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[UV5]], [[UV7]], [[UADDO1]]
937 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO]](s32), [[UADDE]](s32)
938 ; CHECK-NEXT: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
939 ; CHECK-NEXT: [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV1]](s64)
940 ; CHECK-NEXT: [[UADDO2:%[0-9]+]]:_(s32), [[UADDO3:%[0-9]+]]:_(s1) = G_UADDO [[UV8]], [[UV10]]
941 ; CHECK-NEXT: [[UADDE2:%[0-9]+]]:_(s32), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[UV9]], [[UV11]], [[UADDO3]]
942 ; CHECK-NEXT: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO2]](s32), [[UADDE2]](s32)
943 ; CHECK-NEXT: [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](s64)
944 ; CHECK-NEXT: [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UV2]](s64)
945 ; CHECK-NEXT: [[UADDO4:%[0-9]+]]:_(s32), [[UADDO5:%[0-9]+]]:_(s1) = G_UADDO [[UV12]], [[UV14]]
946 ; CHECK-NEXT: [[UADDE4:%[0-9]+]]:_(s32), [[UADDE5:%[0-9]+]]:_(s1) = G_UADDE [[UV13]], [[UV15]], [[UADDO5]]
947 ; CHECK-NEXT: [[MV2:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDO4]](s32), [[UADDE4]](s32)
948 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<3 x s64>) = G_BUILD_VECTOR [[MV]](s64), [[MV1]](s64), [[MV2]](s64)
949 ; CHECK-NEXT: G_BR %bb.2
952 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(<3 x s64>) = G_PHI [[BUILD_VECTOR]](<3 x s64>), %bb.0, [[BUILD_VECTOR1]](<3 x s64>), %bb.1
953 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s64>) = G_IMPLICIT_DEF
954 ; CHECK-NEXT: [[UV16:%[0-9]+]]:_(s64), [[UV17:%[0-9]+]]:_(s64), [[UV18:%[0-9]+]]:_(s64), [[UV19:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[DEF]](<4 x s64>)
955 ; CHECK-NEXT: [[UV20:%[0-9]+]]:_(s64), [[UV21:%[0-9]+]]:_(s64), [[UV22:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[PHI]](<3 x s64>)
956 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s64>) = G_BUILD_VECTOR [[UV20]](s64), [[UV21]](s64), [[UV22]](s64), [[UV19]](s64)
957 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR2]](<4 x s64>)
958 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
960 successors: %bb.1, %bb.2
961 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
963 %0:_(<4 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
964 %1:_(s32) = COPY $vgpr8
965 %2:_(s32) = G_CONSTANT i32 0
966 %3:_(s1) = G_ICMP intpred(eq), %1, %2
967 %4:_(<3 x s64>) = G_EXTRACT %0, 0
974 %5:_(<3 x s64>) = G_ADD %4, %4
978 %6:_(<3 x s64>) = G_PHI %4, %bb.0, %5, %bb.1
979 %7:_(<4 x s64>) = G_IMPLICIT_DEF
980 %8:_(<4 x s64>) = G_INSERT %7, %6, 0
981 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %8
982 S_SETPC_B64 undef $sgpr30_sgpr31
987 tracksRegLiveness: true
990 ; CHECK-LABEL: name: test_phi_p3
992 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
993 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
995 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
996 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
997 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
998 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
999 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1000 ; CHECK-NEXT: G_BR %bb.2
1001 ; CHECK-NEXT: {{ $}}
1003 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1004 ; CHECK-NEXT: {{ $}}
1005 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1006 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p3) = G_PTR_ADD [[COPY]], [[C1]](s32)
1007 ; CHECK-NEXT: G_BR %bb.2
1008 ; CHECK-NEXT: {{ $}}
1010 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p3) = G_PHI [[COPY]](p3), %bb.0, [[PTR_ADD]](p3), %bb.1
1011 ; CHECK-NEXT: $vgpr0 = COPY [[PHI]](p3)
1012 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1014 successors: %bb.1, %bb.2
1015 liveins: $vgpr0, $vgpr1
1017 %0:_(p3) = COPY $vgpr0
1018 %1:_(s32) = COPY $vgpr1
1019 %2:_(s32) = G_CONSTANT i32 0
1020 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1027 %4:_(s32) = G_CONSTANT i32 8
1028 %5:_(p3) = G_PTR_ADD %0, %4
1032 %6:_(p3) = G_PHI %0, %bb.0, %5, %bb.1
1034 S_SETPC_B64 undef $sgpr30_sgpr31
1039 tracksRegLiveness: true
1042 ; CHECK-LABEL: name: test_phi_p5
1044 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1045 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
1046 ; CHECK-NEXT: {{ $}}
1047 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p5) = COPY $vgpr0
1048 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1049 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1050 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1051 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1052 ; CHECK-NEXT: G_BR %bb.2
1053 ; CHECK-NEXT: {{ $}}
1055 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1056 ; CHECK-NEXT: {{ $}}
1057 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1058 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p5) = G_PTR_ADD [[COPY]], [[C1]](s32)
1059 ; CHECK-NEXT: G_BR %bb.2
1060 ; CHECK-NEXT: {{ $}}
1062 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p5) = G_PHI [[COPY]](p5), %bb.0, [[PTR_ADD]](p5), %bb.1
1063 ; CHECK-NEXT: $vgpr0 = COPY [[PHI]](p5)
1064 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1066 successors: %bb.1, %bb.2
1067 liveins: $vgpr0, $vgpr1
1069 %0:_(p5) = COPY $vgpr0
1070 %1:_(s32) = COPY $vgpr1
1071 %2:_(s32) = G_CONSTANT i32 0
1072 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1079 %4:_(s32) = G_CONSTANT i32 8
1080 %5:_(p5) = G_PTR_ADD %0, %4
1084 %6:_(p5) = G_PHI %0, %bb.0, %5, %bb.1
1086 S_SETPC_B64 undef $sgpr30_sgpr31
1091 tracksRegLiveness: true
1094 ; CHECK-LABEL: name: test_phi_p0
1096 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1097 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
1098 ; CHECK-NEXT: {{ $}}
1099 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
1100 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1101 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1102 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1103 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1104 ; CHECK-NEXT: G_BR %bb.2
1105 ; CHECK-NEXT: {{ $}}
1107 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1108 ; CHECK-NEXT: {{ $}}
1109 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
1110 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C1]](s64)
1111 ; CHECK-NEXT: G_BR %bb.2
1112 ; CHECK-NEXT: {{ $}}
1114 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p0) = G_PHI [[COPY]](p0), %bb.0, [[PTR_ADD]](p0), %bb.1
1115 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](p0)
1116 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1118 successors: %bb.1, %bb.2
1119 liveins: $vgpr0_vgpr1, $vgpr2
1121 %0:_(p0) = COPY $vgpr0_vgpr1
1122 %1:_(s32) = COPY $vgpr2
1123 %2:_(s32) = G_CONSTANT i32 0
1124 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1131 %4:_(s64) = G_CONSTANT i64 8
1132 %5:_(p0) = G_PTR_ADD %0, %4
1136 %6:_(p0) = G_PHI %0, %bb.0, %5, %bb.1
1137 $vgpr0_vgpr1 = COPY %6
1138 S_SETPC_B64 undef $sgpr30_sgpr31
1143 tracksRegLiveness: true
1146 ; CHECK-LABEL: name: test_phi_p1
1148 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1149 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
1150 ; CHECK-NEXT: {{ $}}
1151 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
1152 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1153 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1154 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1155 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1156 ; CHECK-NEXT: G_BR %bb.2
1157 ; CHECK-NEXT: {{ $}}
1159 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1160 ; CHECK-NEXT: {{ $}}
1161 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
1162 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1163 ; CHECK-NEXT: G_BR %bb.2
1164 ; CHECK-NEXT: {{ $}}
1166 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p1) = G_PHI [[COPY]](p1), %bb.0, [[PTR_ADD]](p1), %bb.1
1167 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](p1)
1168 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1170 successors: %bb.1, %bb.2
1171 liveins: $vgpr0_vgpr1, $vgpr2
1173 %0:_(p1) = COPY $vgpr0_vgpr1
1174 %1:_(s32) = COPY $vgpr2
1175 %2:_(s32) = G_CONSTANT i32 0
1176 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1183 %4:_(s64) = G_CONSTANT i64 8
1184 %5:_(p1) = G_PTR_ADD %0, %4
1188 %6:_(p1) = G_PHI %0, %bb.0, %5, %bb.1
1189 $vgpr0_vgpr1 = COPY %6
1190 S_SETPC_B64 undef $sgpr30_sgpr31
1195 tracksRegLiveness: true
1198 ; CHECK-LABEL: name: test_phi_p4
1200 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1201 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
1202 ; CHECK-NEXT: {{ $}}
1203 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p4) = COPY $vgpr0_vgpr1
1204 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1205 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1206 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1207 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1208 ; CHECK-NEXT: G_BR %bb.2
1209 ; CHECK-NEXT: {{ $}}
1211 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1212 ; CHECK-NEXT: {{ $}}
1213 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
1214 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p4) = G_PTR_ADD [[COPY]], [[C1]](s64)
1215 ; CHECK-NEXT: G_BR %bb.2
1216 ; CHECK-NEXT: {{ $}}
1218 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p4) = G_PHI [[COPY]](p4), %bb.0, [[PTR_ADD]](p4), %bb.1
1219 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](p4)
1220 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1222 successors: %bb.1, %bb.2
1223 liveins: $vgpr0_vgpr1, $vgpr2
1225 %0:_(p4) = COPY $vgpr0_vgpr1
1226 %1:_(s32) = COPY $vgpr2
1227 %2:_(s32) = G_CONSTANT i32 0
1228 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1235 %4:_(s64) = G_CONSTANT i64 8
1236 %5:_(p4) = G_PTR_ADD %0, %4
1240 %6:_(p4) = G_PHI %0, %bb.0, %5, %bb.1
1241 $vgpr0_vgpr1 = COPY %6
1242 S_SETPC_B64 undef $sgpr30_sgpr31
1246 name: test_phi_p9999
1247 tracksRegLiveness: true
1250 ; CHECK-LABEL: name: test_phi_p9999
1252 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1253 ; CHECK-NEXT: liveins: $vgpr0_vgpr1, $vgpr2
1254 ; CHECK-NEXT: {{ $}}
1255 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p9999) = COPY $vgpr0_vgpr1
1256 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1257 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1258 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1259 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1260 ; CHECK-NEXT: G_BR %bb.2
1261 ; CHECK-NEXT: {{ $}}
1263 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1264 ; CHECK-NEXT: {{ $}}
1265 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(p9999) = G_IMPLICIT_DEF
1266 ; CHECK-NEXT: G_BR %bb.2
1267 ; CHECK-NEXT: {{ $}}
1269 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(p9999) = G_PHI [[COPY]](p9999), %bb.0, [[DEF]](p9999), %bb.1
1270 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[PHI]](p9999)
1271 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1273 successors: %bb.1, %bb.2
1274 liveins: $vgpr0_vgpr1, $vgpr2
1276 %0:_(p9999) = COPY $vgpr0_vgpr1
1277 %1:_(s32) = COPY $vgpr2
1278 %2:_(s32) = G_CONSTANT i32 0
1279 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1286 %4:_(p9999) = G_IMPLICIT_DEF
1290 %5:_(p9999) = G_PHI %0, %bb.0, %4, %bb.1
1291 $vgpr0_vgpr1 = COPY %5
1292 S_SETPC_B64 undef $sgpr30_sgpr31
1297 tracksRegLiveness: true
1300 ; CHECK-LABEL: name: test_phi_s1
1302 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1303 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
1304 ; CHECK-NEXT: {{ $}}
1305 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1306 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1307 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1308 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1309 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[COPY1]](s32)
1310 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1311 ; CHECK-NEXT: G_BR %bb.2
1312 ; CHECK-NEXT: {{ $}}
1314 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1315 ; CHECK-NEXT: {{ $}}
1316 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
1317 ; CHECK-NEXT: G_BR %bb.2
1318 ; CHECK-NEXT: {{ $}}
1320 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s1) = G_PHI [[TRUNC]](s1), %bb.0, [[DEF]](s1), %bb.1
1321 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[PHI]](s1)
1322 ; CHECK-NEXT: $vgpr0 = COPY [[ZEXT]](s32)
1323 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1325 successors: %bb.1, %bb.2
1326 liveins: $vgpr0, $vgpr1
1328 %0:_(s32) = COPY $vgpr0
1329 %1:_(s32) = COPY $vgpr1
1330 %2:_(s32) = G_CONSTANT i32 0
1331 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1332 %4:_(s1) = G_TRUNC %1
1339 %5:_(s1) = G_IMPLICIT_DEF
1343 %6:_(s1) = G_PHI %4, %bb.0, %5, %bb.1
1344 %7:_(s32) = G_ZEXT %6
1346 S_SETPC_B64 undef $sgpr30_sgpr31
1351 tracksRegLiveness: true
1354 ; CHECK-LABEL: name: test_phi_s7
1356 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1357 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
1358 ; CHECK-NEXT: {{ $}}
1359 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1360 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1361 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1362 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1363 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1364 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1365 ; CHECK-NEXT: G_BR %bb.2
1366 ; CHECK-NEXT: {{ $}}
1368 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1369 ; CHECK-NEXT: {{ $}}
1370 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1371 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[DEF]](s32)
1372 ; CHECK-NEXT: G_BR %bb.2
1373 ; CHECK-NEXT: {{ $}}
1375 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s16) = G_PHI [[TRUNC]](s16), %bb.0, [[TRUNC1]](s16), %bb.1
1376 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 127
1377 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[PHI]](s16)
1378 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ANYEXT]], [[C1]]
1379 ; CHECK-NEXT: $vgpr0 = COPY [[AND]](s32)
1380 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1382 successors: %bb.1, %bb.2
1383 liveins: $vgpr0, $vgpr1
1385 %0:_(s32) = COPY $vgpr0
1386 %1:_(s32) = COPY $vgpr1
1387 %2:_(s32) = G_CONSTANT i32 0
1388 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1389 %4:_(s7) = G_TRUNC %1
1396 %5:_(s7) = G_IMPLICIT_DEF
1400 %6:_(s7) = G_PHI %4, %bb.0, %5, %bb.1
1401 %7:_(s32) = G_ZEXT %6
1403 S_SETPC_B64 undef $sgpr30_sgpr31
1408 tracksRegLiveness: true
1411 ; CHECK-LABEL: name: test_phi_s8
1413 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1414 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
1415 ; CHECK-NEXT: {{ $}}
1416 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1417 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1418 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1419 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1420 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1421 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1422 ; CHECK-NEXT: G_BR %bb.2
1423 ; CHECK-NEXT: {{ $}}
1425 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1426 ; CHECK-NEXT: {{ $}}
1427 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1428 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[DEF]](s32)
1429 ; CHECK-NEXT: G_BR %bb.2
1430 ; CHECK-NEXT: {{ $}}
1432 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s16) = G_PHI [[TRUNC]](s16), %bb.0, [[TRUNC1]](s16), %bb.1
1433 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
1434 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[PHI]](s16)
1435 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[ANYEXT]], [[C1]]
1436 ; CHECK-NEXT: $vgpr0 = COPY [[AND]](s32)
1437 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1439 successors: %bb.1, %bb.2
1440 liveins: $vgpr0, $vgpr1
1442 %0:_(s32) = COPY $vgpr0
1443 %1:_(s32) = COPY $vgpr1
1444 %2:_(s32) = G_CONSTANT i32 0
1445 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1446 %4:_(s8) = G_TRUNC %1
1453 %5:_(s8) = G_IMPLICIT_DEF
1457 %6:_(s8) = G_PHI %4, %bb.0, %5, %bb.1
1458 %7:_(s32) = G_ZEXT %6
1460 S_SETPC_B64 undef $sgpr30_sgpr31
1465 tracksRegLiveness: true
1468 ; CHECK-LABEL: name: test_phi_s16
1470 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1471 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1
1472 ; CHECK-NEXT: {{ $}}
1473 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1474 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1475 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1476 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1477 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1478 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1479 ; CHECK-NEXT: G_BR %bb.2
1480 ; CHECK-NEXT: {{ $}}
1482 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1483 ; CHECK-NEXT: {{ $}}
1484 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s16) = G_IMPLICIT_DEF
1485 ; CHECK-NEXT: G_BR %bb.2
1486 ; CHECK-NEXT: {{ $}}
1488 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s16) = G_PHI [[TRUNC]](s16), %bb.0, [[DEF]](s16), %bb.1
1489 ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[PHI]](s16)
1490 ; CHECK-NEXT: $vgpr0 = COPY [[ZEXT]](s32)
1491 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1493 successors: %bb.1, %bb.2
1494 liveins: $vgpr0, $vgpr1
1496 %0:_(s32) = COPY $vgpr0
1497 %1:_(s32) = COPY $vgpr1
1498 %2:_(s32) = G_CONSTANT i32 0
1499 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1500 %4:_(s16) = G_TRUNC %1
1507 %5:_(s16) = G_IMPLICIT_DEF
1511 %6:_(s16) = G_PHI %4, %bb.0, %5, %bb.1
1512 %7:_(s32) = G_ZEXT %6
1514 S_SETPC_B64 undef $sgpr30_sgpr31
1519 tracksRegLiveness: true
1522 ; CHECK-LABEL: name: test_phi_s128
1524 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1525 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
1526 ; CHECK-NEXT: {{ $}}
1527 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1528 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
1529 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1530 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1531 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1532 ; CHECK-NEXT: G_BR %bb.2
1533 ; CHECK-NEXT: {{ $}}
1535 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1536 ; CHECK-NEXT: {{ $}}
1537 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s128)
1538 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s128)
1539 ; CHECK-NEXT: [[UADDO:%[0-9]+]]:_(s32), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[UV]], [[UV4]]
1540 ; CHECK-NEXT: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[UV1]], [[UV5]], [[UADDO1]]
1541 ; CHECK-NEXT: [[UADDE2:%[0-9]+]]:_(s32), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[UV2]], [[UV6]], [[UADDE1]]
1542 ; CHECK-NEXT: [[UADDE4:%[0-9]+]]:_(s32), [[UADDE5:%[0-9]+]]:_(s1) = G_UADDE [[UV3]], [[UV7]], [[UADDE3]]
1543 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[UADDO]](s32), [[UADDE]](s32), [[UADDE2]](s32), [[UADDE4]](s32)
1544 ; CHECK-NEXT: G_BR %bb.2
1545 ; CHECK-NEXT: {{ $}}
1547 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s128) = G_PHI [[COPY]](s128), %bb.0, [[MV]](s128), %bb.1
1548 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[PHI]](s128)
1549 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1551 successors: %bb.1, %bb.2
1552 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
1554 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1555 %1:_(s32) = COPY $vgpr4
1556 %2:_(s32) = G_CONSTANT i32 0
1557 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1564 %4:_(s128) = G_ADD %0, %0
1568 %5:_(s128) = G_PHI %0, %bb.0, %4, %bb.1
1569 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %5
1570 S_SETPC_B64 undef $sgpr30_sgpr31
1575 tracksRegLiveness: true
1578 ; CHECK-LABEL: name: test_phi_s256
1580 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1581 ; CHECK-NEXT: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
1582 ; CHECK-NEXT: {{ $}}
1583 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
1584 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr8
1585 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1586 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY1]](s32), [[C]]
1587 ; CHECK-NEXT: G_BRCOND [[ICMP]](s1), %bb.1
1588 ; CHECK-NEXT: G_BR %bb.2
1589 ; CHECK-NEXT: {{ $}}
1591 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1592 ; CHECK-NEXT: {{ $}}
1593 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s256)
1594 ; CHECK-NEXT: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s256)
1595 ; CHECK-NEXT: [[UADDO:%[0-9]+]]:_(s32), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[UV]], [[UV8]]
1596 ; CHECK-NEXT: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[UV1]], [[UV9]], [[UADDO1]]
1597 ; CHECK-NEXT: [[UADDE2:%[0-9]+]]:_(s32), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[UV2]], [[UV10]], [[UADDE1]]
1598 ; CHECK-NEXT: [[UADDE4:%[0-9]+]]:_(s32), [[UADDE5:%[0-9]+]]:_(s1) = G_UADDE [[UV3]], [[UV11]], [[UADDE3]]
1599 ; CHECK-NEXT: [[UADDE6:%[0-9]+]]:_(s32), [[UADDE7:%[0-9]+]]:_(s1) = G_UADDE [[UV4]], [[UV12]], [[UADDE5]]
1600 ; CHECK-NEXT: [[UADDE8:%[0-9]+]]:_(s32), [[UADDE9:%[0-9]+]]:_(s1) = G_UADDE [[UV5]], [[UV13]], [[UADDE7]]
1601 ; CHECK-NEXT: [[UADDE10:%[0-9]+]]:_(s32), [[UADDE11:%[0-9]+]]:_(s1) = G_UADDE [[UV6]], [[UV14]], [[UADDE9]]
1602 ; CHECK-NEXT: [[UADDE12:%[0-9]+]]:_(s32), [[UADDE13:%[0-9]+]]:_(s1) = G_UADDE [[UV7]], [[UV15]], [[UADDE11]]
1603 ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s256) = G_MERGE_VALUES [[UADDO]](s32), [[UADDE]](s32), [[UADDE2]](s32), [[UADDE4]](s32), [[UADDE6]](s32), [[UADDE8]](s32), [[UADDE10]](s32), [[UADDE12]](s32)
1604 ; CHECK-NEXT: G_BR %bb.2
1605 ; CHECK-NEXT: {{ $}}
1607 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s256) = G_PHI [[COPY]](s256), %bb.0, [[MV]](s256), %bb.1
1608 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[PHI]](s256)
1609 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1611 successors: %bb.1, %bb.2
1612 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
1614 %0:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
1615 %1:_(s32) = COPY $vgpr8
1616 %2:_(s32) = G_CONSTANT i32 0
1617 %3:_(s1) = G_ICMP intpred(eq), %1, %2
1624 %4:_(s256) = G_ADD %0, %0
1628 %5:_(s256) = G_PHI %0, %bb.0, %4, %bb.1
1629 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
1630 S_SETPC_B64 undef $sgpr30_sgpr31
1635 tracksRegLiveness: true
1638 ; CHECK-LABEL: name: test_phi_v2s1
1640 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
1641 ; CHECK-NEXT: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
1642 ; CHECK-NEXT: {{ $}}
1643 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
1644 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1
1645 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1646 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr1
1647 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1648 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
1649 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1650 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
1651 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1652 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C1]](s32)
1653 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1654 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C2]]
1655 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C2]]
1656 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[AND]](s32), [[AND1]]
1657 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
1658 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
1659 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[AND2]](s32), [[AND3]]
1660 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s1) = G_ICMP intpred(eq), [[COPY3]](s32), [[C]]
1661 ; CHECK-NEXT: G_BRCOND [[ICMP2]](s1), %bb.1
1662 ; CHECK-NEXT: G_BR %bb.2
1663 ; CHECK-NEXT: {{ $}}
1665 ; CHECK-NEXT: successors: %bb.2(0x80000000)
1666 ; CHECK-NEXT: {{ $}}
1667 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
1668 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1669 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C3]](s32)
1670 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[COPY2]](<2 x s16>)
1671 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C3]](s32)
1672 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1673 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C4]]
1674 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s32) = G_AND [[BITCAST3]], [[C4]]
1675 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[AND4]](s32), [[AND5]]
1676 ; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s32) = G_AND [[LSHR2]], [[C4]]
1677 ; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s32) = G_AND [[LSHR3]], [[C4]]
1678 ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[AND6]](s32), [[AND7]]
1679 ; CHECK-NEXT: G_BR %bb.2
1680 ; CHECK-NEXT: {{ $}}
1682 ; CHECK-NEXT: [[PHI:%[0-9]+]]:_(s1) = G_PHI [[ICMP]](s1), %bb.0, [[ICMP3]](s1), %bb.1
1683 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:_(s1) = G_PHI [[ICMP1]](s1), %bb.0, [[ICMP4]](s1), %bb.1
1684 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[PHI]](s1)
1685 ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[PHI1]](s1)
1686 ; CHECK-NEXT: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1687 ; CHECK-NEXT: [[AND8:%[0-9]+]]:_(s32) = G_AND [[ANYEXT]], [[C5]]
1688 ; CHECK-NEXT: [[AND9:%[0-9]+]]:_(s32) = G_AND [[ANYEXT1]], [[C5]]
1689 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[AND8]](s32), [[AND9]](s32)
1690 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
1691 ; CHECK-NEXT: S_SETPC_B64 undef $sgpr30_sgpr31
1693 successors: %bb.1, %bb.2
1694 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
1696 %0:_(<2 x s16>) = COPY $vgpr0
1697 %1:_(<2 x s16>) = COPY $vgpr1
1698 %2:_(<2 x s16>) = COPY $vgpr2
1699 %3:_(s32) = COPY $vgpr1
1700 %4:_(s32) = G_CONSTANT i32 0
1701 %5:_(<2 x s1>) = G_ICMP intpred(eq), %0, %1
1702 %6:_(s1) = G_ICMP intpred(eq), %3, %4
1709 %7:_(<2 x s1>) = G_ICMP intpred(ne), %0, %2
1713 %8:_(<2 x s1>) = G_PHI %5, %bb.0, %7, %bb.1
1714 %9:_(<2 x s32>) = G_ZEXT %8
1715 $vgpr0_vgpr1 = COPY %9
1716 S_SETPC_B64 undef $sgpr30_sgpr31