1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s
5 name: extract_vector_elt_0_v2i32
10 ; CHECK-LABEL: name: extract_vector_elt_0_v2i32
11 ; CHECK: liveins: $vgpr0_vgpr1
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
14 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
15 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
16 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
17 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
18 %1:_(s32) = G_CONSTANT i32 0
19 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
23 name: extract_vector_elt_1_v2i32
28 ; CHECK-LABEL: name: extract_vector_elt_1_v2i32
29 ; CHECK: liveins: $vgpr0_vgpr1
31 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
32 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
33 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
34 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
35 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
36 %1:_(s32) = G_CONSTANT i32 1
37 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
41 name: extract_vector_elt_2_v2i32
46 ; CHECK-LABEL: name: extract_vector_elt_2_v2i32
47 ; CHECK: liveins: $vgpr0_vgpr1
49 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
50 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
51 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
52 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
53 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
54 %1:_(s32) = G_CONSTANT i32 1
55 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
59 name: extract_vector_elt_0_v3i32
63 liveins: $vgpr0_vgpr1_vgpr2
64 ; CHECK-LABEL: name: extract_vector_elt_0_v3i32
65 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
67 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
68 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
69 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
70 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
71 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
72 %1:_(s32) = G_CONSTANT i32 0
73 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
77 name: extract_vector_elt_0_v4i32
81 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
82 ; CHECK-LABEL: name: extract_vector_elt_0_v4i32
83 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
86 ; 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>)
87 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
88 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
89 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
90 %1:_(s32) = G_CONSTANT i32 0
91 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
96 name: extract_vector_elt_0_v5i32
101 ; CHECK-LABEL: name: extract_vector_elt_0_v5i32
102 ; CHECK: liveins: $vgpr0
104 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
105 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
106 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
107 %0:_(s32) = COPY $vgpr0
108 %1:_(<5 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0, %0
109 %2:_(s32) = G_CONSTANT i32 0
110 %3:_(s32) = G_EXTRACT_VECTOR_ELT %1, %2
115 name: extract_vector_elt_0_v6i32
120 ; CHECK-LABEL: name: extract_vector_elt_0_v6i32
121 ; CHECK: liveins: $vgpr0
123 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
124 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
125 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
126 %0:_(s32) = COPY $vgpr0
127 %1:_(<6 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0, %0, %0
128 %2:_(s32) = G_CONSTANT i32 0
129 %3:_(s32) = G_EXTRACT_VECTOR_ELT %1, %2
134 name: extract_vector_elt_0_v7i32
139 ; CHECK-LABEL: name: extract_vector_elt_0_v7i32
140 ; CHECK: liveins: $vgpr0
142 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
143 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
144 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
145 %0:_(s32) = COPY $vgpr0
146 %1:_(<7 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0, %0, %0, %0
147 %2:_(s32) = G_CONSTANT i32 0
148 %3:_(s32) = G_EXTRACT_VECTOR_ELT %1, %2
153 name: extract_vector_elt_0_v8i32
158 ; CHECK-LABEL: name: extract_vector_elt_0_v8i32
159 ; CHECK: liveins: $vgpr0
161 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
162 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
163 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
164 %0:_(s32) = COPY $vgpr0
165 %1:_(<8 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0, %0, %0, %0, %0
166 %2:_(s32) = G_CONSTANT i32 0
167 %3:_(s32) = G_EXTRACT_VECTOR_ELT %1, %2
172 name: extract_vector_elt_0_v16i32
177 ; CHECK-LABEL: name: extract_vector_elt_0_v16i32
178 ; CHECK: liveins: $vgpr0
180 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
181 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
182 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
183 %0:_(s32) = COPY $vgpr0
184 %1:_(<16 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
185 %2:_(s32) = G_CONSTANT i32 0
186 %3:_(s32) = G_EXTRACT_VECTOR_ELT %1, %2
191 name: extract_vector_elt_var_v2i32
195 liveins: $vgpr0_vgpr1, $vgpr2
196 ; CHECK-LABEL: name: extract_vector_elt_var_v2i32
197 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
199 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
200 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
201 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[COPY1]](s32)
202 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
203 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
204 %1:_(s32) = COPY $vgpr2
205 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
210 name: extract_vector_elt_var_v8i32
214 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
215 ; CHECK-LABEL: name: extract_vector_elt_var_v8i32
216 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
218 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
219 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
220 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<8 x s32>), [[COPY1]](s32)
221 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
222 %0:_(<8 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
223 %1:_(s32) = COPY $vgpr2
224 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
230 name: extract_vector_elt_0_v2i8_i32
235 ; CHECK-LABEL: name: extract_vector_elt_0_v2i8_i32
236 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
237 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<2 x s32>)
238 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
239 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
240 %0:_(<2 x s8>) = G_IMPLICIT_DEF
241 %1:_(s32) = G_CONSTANT i32 0
242 %2:_(s8) = G_EXTRACT_VECTOR_ELT %0, %1
243 %3:_(s32) = G_ANYEXT %2
248 name: extract_vector_elt_0_v2i16_i32
253 ; CHECK-LABEL: name: extract_vector_elt_0_v2i16_i32
254 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s16>) = G_IMPLICIT_DEF
255 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
256 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[DEF]](<2 x s16>)
257 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
258 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
259 %0:_(<2 x s16>) = G_IMPLICIT_DEF
260 %1:_(s32) = G_CONSTANT i32 0
261 %2:_(s16) = G_EXTRACT_VECTOR_ELT %0, %1
262 %3:_(s32) = G_ANYEXT %2
267 name: extract_vector_elt_0_v2i1_i32
272 ; CHECK-LABEL: name: extract_vector_elt_0_v2i1_i32
273 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
274 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<2 x s32>)
275 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
276 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
277 %0:_(<2 x s1>) = G_IMPLICIT_DEF
278 %1:_(s32) = G_CONSTANT i32 0
279 %2:_(s1) = G_EXTRACT_VECTOR_ELT %0, %1
280 %3:_(s32) = G_ANYEXT %2
285 name: extract_vector_elt_0_v2i1_i1
290 ; CHECK-LABEL: name: extract_vector_elt_0_v2i1_i1
291 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
292 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<2 x s32>)
293 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
294 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
295 %0:_(<2 x s1>) = G_IMPLICIT_DEF
296 %1:_(s1) = G_CONSTANT i1 false
297 %2:_(s1) = G_EXTRACT_VECTOR_ELT %0, %1
298 %3:_(s32) = G_ANYEXT %2
303 name: extract_vector_elt_v2s8_varidx_i32
307 liveins: $vgpr0, $vgpr1
309 ; CHECK-LABEL: name: extract_vector_elt_v2s8_varidx_i32
310 ; CHECK: liveins: $vgpr0, $vgpr1
312 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
313 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
314 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
315 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
316 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[LSHR]](s32)
317 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR]](<2 x s32>), [[COPY1]](s32)
318 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
319 %0:_(s32) = COPY $vgpr0
320 %1:_(s32) = COPY $vgpr1
321 %2:_(s16) = G_TRUNC %0
322 %3:_(<2 x s8>) = G_BITCAST %2
323 %4:_(s8) = G_EXTRACT_VECTOR_ELT %3, %1
324 %5:_(s32) = G_ANYEXT %4
329 name: extract_vector_elt_v2s8_constidx_0_i32
335 ; CHECK-LABEL: name: extract_vector_elt_v2s8_constidx_0_i32
336 ; CHECK: liveins: $vgpr0
338 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
339 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
340 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
341 %0:_(s32) = COPY $vgpr0
342 %1:_(s32) = COPY $vgpr1
343 %2:_(s16) = G_TRUNC %0
344 %3:_(<2 x s8>) = G_BITCAST %2
345 %4:_(s32) = G_CONSTANT i32 0
346 %5:_(s8) = G_EXTRACT_VECTOR_ELT %3, %4
347 %6:_(s32) = G_ANYEXT %5
352 name: extract_vector_elt_v2s8_constidx_1_i32
358 ; CHECK-LABEL: name: extract_vector_elt_v2s8_constidx_1_i32
359 ; CHECK: liveins: $vgpr0
361 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
362 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
363 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
364 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
365 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
366 %0:_(s32) = COPY $vgpr0
367 %1:_(s32) = COPY $vgpr1
368 %2:_(s16) = G_TRUNC %0
369 %3:_(<2 x s8>) = G_BITCAST %2
370 %4:_(s32) = G_CONSTANT i32 1
371 %5:_(s8) = G_EXTRACT_VECTOR_ELT %3, %4
372 %6:_(s32) = G_ANYEXT %5
377 name: extract_vector_elt_v4s4_varidx_i32
381 liveins: $vgpr0, $vgpr1
383 ; CHECK-LABEL: name: extract_vector_elt_v4s4_varidx_i32
384 ; CHECK: liveins: $vgpr0, $vgpr1
386 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
387 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
388 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
389 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
390 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
391 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
392 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
393 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C2]](s32)
394 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[LSHR]](s32), [[LSHR1]](s32), [[LSHR2]](s32)
395 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR]](<4 x s32>), [[COPY1]](s32)
396 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
397 %0:_(s32) = COPY $vgpr0
398 %1:_(s32) = COPY $vgpr1
399 %2:_(s16) = G_TRUNC %0
400 %3:_(<4 x s4>) = G_BITCAST %2
401 %4:_(s4) = G_EXTRACT_VECTOR_ELT %3, %1
402 %5:_(s32) = G_ANYEXT %4
407 name: extract_vector_elt_v3s8_varidx_i32
411 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
413 ; CHECK-LABEL: name: extract_vector_elt_v3s8_varidx_i32
414 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
416 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
417 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
418 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<3 x s32>), [[COPY1]](s32)
419 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
420 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
421 %1:_(s32) = COPY $vgpr3
422 %2:_(<3 x s8>) = G_TRUNC %0
423 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
424 %4:_(s32) = G_ANYEXT %3
429 name: extract_vector_elt_v4s8_varidx_i32
433 liveins: $vgpr0, $vgpr1
435 ; CHECK-LABEL: name: extract_vector_elt_v4s8_varidx_i32
436 ; CHECK: liveins: $vgpr0, $vgpr1
438 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
439 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
440 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
441 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
442 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C]](s32)
443 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[SHL]](s32)
444 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
445 %0:_(s32) = COPY $vgpr0
446 %1:_(s32) = COPY $vgpr1
447 %2:_(<4 x s8>) = G_BITCAST %0
448 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
449 %4:_(s32) = G_ANYEXT %3
454 name: extract_vector_elt_v4s8_constidx_0_i32
460 ; CHECK-LABEL: name: extract_vector_elt_v4s8_constidx_0_i32
461 ; CHECK: liveins: $vgpr0
463 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
464 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
465 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
466 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
467 %0:_(s32) = COPY $vgpr0
468 %1:_(<4 x s8>) = G_BITCAST %0
469 %2:_(s32) = G_CONSTANT i32 0
470 %3:_(s8) = G_EXTRACT_VECTOR_ELT %1, %2
471 %4:_(s32) = G_ANYEXT %3
476 name: extract_vector_elt_v4s8_constidx_1_i32
482 ; CHECK-LABEL: name: extract_vector_elt_v4s8_constidx_1_i32
483 ; CHECK: liveins: $vgpr0
485 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
486 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
487 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
488 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
489 %0:_(s32) = COPY $vgpr0
490 %1:_(<4 x s8>) = G_BITCAST %0
491 %2:_(s32) = G_CONSTANT i32 1
492 %3:_(s8) = G_EXTRACT_VECTOR_ELT %1, %2
493 %4:_(s32) = G_ANYEXT %3
498 name: extract_vector_elt_v4s8_constidx_2_i32
504 ; CHECK-LABEL: name: extract_vector_elt_v4s8_constidx_2_i32
505 ; CHECK: liveins: $vgpr0
507 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
508 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
509 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
510 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
511 %0:_(s32) = COPY $vgpr0
512 %1:_(<4 x s8>) = G_BITCAST %0
513 %2:_(s32) = G_CONSTANT i32 2
514 %3:_(s8) = G_EXTRACT_VECTOR_ELT %1, %2
515 %4:_(s32) = G_ANYEXT %3
520 name: extract_vector_elt_v4s8_constidx_3_i32
526 ; CHECK-LABEL: name: extract_vector_elt_v4s8_constidx_3_i32
527 ; CHECK: liveins: $vgpr0
529 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
530 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
531 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
532 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
533 %0:_(s32) = COPY $vgpr0
534 %1:_(<4 x s8>) = G_BITCAST %0
535 %2:_(s32) = G_CONSTANT i32 3
536 %3:_(s8) = G_EXTRACT_VECTOR_ELT %1, %2
537 %4:_(s32) = G_ANYEXT %3
544 name: extract_vector_elt_v8s8_varidx_i32
548 liveins: $vgpr0_vgpr1, $vgpr2
550 ; CHECK-LABEL: name: extract_vector_elt_v8s8_varidx_i32
551 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
553 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
554 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
555 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
556 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32)
557 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
558 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
559 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR]](<2 x s32>), [[LSHR]](s32)
560 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
561 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
562 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
563 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[EVEC]], [[SHL]](s32)
564 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR1]](s32)
565 %0:_(s64) = COPY $vgpr0_vgpr1
566 %1:_(s32) = COPY $vgpr2
567 %2:_(<8 x s8>) = G_BITCAST %0
568 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
569 %4:_(s32) = G_ANYEXT %3
575 name: extract_vector_elt_v8s8_constidx_0_i32
579 liveins: $vgpr0_vgpr1
581 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_0_i32
582 ; CHECK: liveins: $vgpr0_vgpr1
584 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
585 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
586 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
587 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
588 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
589 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
590 %0:_(s64) = COPY $vgpr0_vgpr1
591 %1:_(s32) = G_CONSTANT i32 0
592 %2:_(<8 x s8>) = G_BITCAST %0
593 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
594 %4:_(s32) = G_ANYEXT %3
599 name: extract_vector_elt_v8s8_constidx_1_i32
603 liveins: $vgpr0_vgpr1
605 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_1_i32
606 ; CHECK: liveins: $vgpr0_vgpr1
608 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
609 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
610 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
611 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
612 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
613 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
614 %0:_(s64) = COPY $vgpr0_vgpr1
615 %1:_(s32) = G_CONSTANT i32 1
616 %2:_(<8 x s8>) = G_BITCAST %0
617 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
618 %4:_(s32) = G_ANYEXT %3
623 name: extract_vector_elt_v8s8_constidx_3_i32
627 liveins: $vgpr0_vgpr1
629 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_3_i32
630 ; CHECK: liveins: $vgpr0_vgpr1
632 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
633 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
634 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
635 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
636 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
637 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
638 %0:_(s64) = COPY $vgpr0_vgpr1
639 %1:_(s32) = G_CONSTANT i32 3
640 %2:_(<8 x s8>) = G_BITCAST %0
641 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
642 %4:_(s32) = G_ANYEXT %3
647 name: extract_vector_elt_v8s8_constidx_4_i32
651 liveins: $vgpr0_vgpr1
653 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_4_i32
654 ; CHECK: liveins: $vgpr0_vgpr1
656 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
657 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
658 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
659 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
660 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
661 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
662 %0:_(s64) = COPY $vgpr0_vgpr1
663 %1:_(s32) = G_CONSTANT i32 4
664 %2:_(<8 x s8>) = G_BITCAST %0
665 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
666 %4:_(s32) = G_ANYEXT %3
671 name: extract_vector_elt_v8s8_constidx_5_i32
675 liveins: $vgpr0_vgpr1
677 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_5_i32
678 ; CHECK: liveins: $vgpr0_vgpr1
680 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
681 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
682 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
683 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
684 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
685 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
686 %0:_(s64) = COPY $vgpr0_vgpr1
687 %1:_(s32) = G_CONSTANT i32 5
688 %2:_(<8 x s8>) = G_BITCAST %0
689 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
690 %4:_(s32) = G_ANYEXT %3
695 name: extract_vector_elt_v8s8_constidx_7_i32
699 liveins: $vgpr0_vgpr1
701 ; CHECK-LABEL: name: extract_vector_elt_v8s8_constidx_7_i32
702 ; CHECK: liveins: $vgpr0_vgpr1
704 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
705 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
706 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
707 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
708 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
709 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
710 %0:_(s64) = COPY $vgpr0_vgpr1
711 %1:_(s32) = G_CONSTANT i32 7
712 %2:_(<8 x s8>) = G_BITCAST %0
713 %3:_(s8) = G_EXTRACT_VECTOR_ELT %2, %1
714 %4:_(s32) = G_ANYEXT %3
719 name: extract_vector_elt_v2s16_varidx_i32
723 liveins: $vgpr0, $vgpr1
725 ; CHECK-LABEL: name: extract_vector_elt_v2s16_varidx_i32
726 ; CHECK: liveins: $vgpr0, $vgpr1
728 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
729 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
730 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
731 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
732 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
733 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
734 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
735 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[SHL]](s32)
736 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
737 %0:_(<2 x s16>) = COPY $vgpr0
738 %1:_(s32) = COPY $vgpr1
739 %2:_(s16) = G_EXTRACT_VECTOR_ELT %0, %1
740 %3:_(s32) = G_ANYEXT %2
745 name: extract_vector_elt_v2s16_idx0_i32
751 ; CHECK-LABEL: name: extract_vector_elt_v2s16_idx0_i32
752 ; CHECK: liveins: $vgpr0
754 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
755 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
756 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
757 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
758 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
759 %0:_(<2 x s16>) = COPY $vgpr0
760 %1:_(s32) = G_CONSTANT i32 0
761 %2:_(s16) = G_EXTRACT_VECTOR_ELT %0, %1
762 %3:_(s32) = G_ANYEXT %2
767 name: extract_vector_elt_v2s16_idx1_i32
773 ; CHECK-LABEL: name: extract_vector_elt_v2s16_idx1_i32
774 ; CHECK: liveins: $vgpr0
776 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
777 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
778 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
779 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
780 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
781 %0:_(<2 x s16>) = COPY $vgpr0
782 %1:_(s32) = G_CONSTANT i32 1
783 %2:_(s16) = G_EXTRACT_VECTOR_ELT %0, %1
784 %3:_(s32) = G_ANYEXT %2
789 name: extract_vector_elt_v3s16_varidx_i32
793 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
795 ; CHECK-LABEL: name: extract_vector_elt_v3s16_varidx_i32
796 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
798 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
799 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
800 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<3 x s32>), [[COPY1]](s32)
801 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
802 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
803 %1:_(s32) = COPY $vgpr3
804 %2:_(<3 x s16>) = G_TRUNC %0
805 %3:_(s16) = G_EXTRACT_VECTOR_ELT %2, %1
806 %4:_(s32) = G_ANYEXT %3
811 name: extract_vector_elt_v3s16_idx0_i32
815 liveins: $vgpr0_vgpr1_vgpr2
817 ; CHECK-LABEL: name: extract_vector_elt_v3s16_idx0_i32
818 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
820 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
821 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
822 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
823 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
824 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
825 %1:_(s32) = G_CONSTANT i32 0
826 %2:_(<3 x s16>) = G_TRUNC %0
827 %3:_(s16) = G_EXTRACT_VECTOR_ELT %2, %1
828 %4:_(s32) = G_ANYEXT %3
833 name: extract_vector_elt_v3s16_idx1_i32
837 liveins: $vgpr0_vgpr1_vgpr2
839 ; CHECK-LABEL: name: extract_vector_elt_v3s16_idx1_i32
840 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
842 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
843 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
844 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
845 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
846 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
847 %1:_(s32) = G_CONSTANT i32 1
848 %2:_(<3 x s16>) = G_TRUNC %0
849 %3:_(s16) = G_EXTRACT_VECTOR_ELT %2, %1
850 %4:_(s32) = G_ANYEXT %3
855 name: extract_vector_elt_v3s16_idx2_i32
859 liveins: $vgpr0_vgpr1_vgpr2
861 ; CHECK-LABEL: name: extract_vector_elt_v3s16_idx2_i32
862 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
864 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
865 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
866 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
867 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
868 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
869 %1:_(s32) = G_CONSTANT i32 2
870 %2:_(<3 x s16>) = G_TRUNC %0
871 %3:_(s16) = G_EXTRACT_VECTOR_ELT %2, %1
872 %4:_(s32) = G_ANYEXT %3
877 name: extract_vector_elt_v4s16_varidx_i32
881 liveins: $vgpr0_vgpr1, $vgpr2
883 ; CHECK-LABEL: name: extract_vector_elt_v4s16_varidx_i32
884 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
886 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
887 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
888 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s32>) = G_BITCAST [[COPY]](<4 x s16>)
889 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
890 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
891 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BITCAST]](<2 x s32>), [[LSHR]](s32)
892 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
893 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
894 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
895 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[EVEC]], [[SHL]](s32)
896 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR1]](s32)
897 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
898 %1:_(s32) = COPY $vgpr2
899 %2:_(s16) = G_EXTRACT_VECTOR_ELT %0, %1
900 %3:_(s32) = G_ANYEXT %2
905 name: extract_vector_elt_v2s128_varidx_i32
909 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
911 ; CHECK-LABEL: name: extract_vector_elt_v2s128_varidx_i32
912 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8
914 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
915 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr8
916 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<4 x s64>) = G_BITCAST [[COPY]](<2 x s128>)
917 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
918 ; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s32) = G_MUL [[COPY1]], [[C]]
919 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
920 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[MUL]], [[C1]]
921 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[BITCAST]](<4 x s64>), [[ADD]](s32)
922 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
923 ; CHECK-NEXT: [[ADD1:%[0-9]+]]:_(s32) = G_ADD [[MUL]], [[C2]]
924 ; CHECK-NEXT: [[EVEC1:%[0-9]+]]:_(s64) = G_EXTRACT_VECTOR_ELT [[BITCAST]](<4 x s64>), [[ADD1]](s32)
925 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[EVEC]](s64), [[EVEC1]](s64)
926 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s128) = G_BITCAST [[BUILD_VECTOR]](<2 x s64>)
927 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BITCAST1]](s128)
928 %0:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
929 %1:_(s32) = COPY $vgpr8
930 %2:_(s128) = G_EXTRACT_VECTOR_ELT %0, %1
931 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
935 name: extract_vector_elt_v2i32_varidx_i64
939 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
941 ; CHECK-LABEL: name: extract_vector_elt_v2i32_varidx_i64
942 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
944 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
945 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
946 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)
947 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<2 x s32>), [[TRUNC]](s32)
948 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
949 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
950 %1:_(s64) = COPY $vgpr2_vgpr3
951 %2:_(s32) = G_EXTRACT_VECTOR_ELT %0, %1
955 name: extract_vector_elt_0_v2i64
959 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
961 ; CHECK-LABEL: name: extract_vector_elt_0_v2i64
962 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
964 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
965 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
966 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY [[UV]](s64)
967 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[COPY1]](s64)
968 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
969 %1:_(s32) = G_CONSTANT i32 0
970 %2:_(s64) = G_EXTRACT_VECTOR_ELT %0, %1
971 $vgpr0_vgpr1 = COPY %2
975 name: extract_vector_elt_0_v8i64
979 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
981 ; CHECK-LABEL: name: extract_vector_elt_0_v8i64
982 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
984 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<8 x s64>) = G_IMPLICIT_DEF
985 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64), [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64), [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64), [[UV6:%[0-9]+]]:_(s64), [[UV7:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[DEF]](<8 x s64>)
986 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[UV]](s64)
987 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[COPY]](s64)
988 %0:_(<8 x s64>) = G_IMPLICIT_DEF
989 %1:_(s32) = G_CONSTANT i32 0
990 %2:_(s64) = G_EXTRACT_VECTOR_ELT %0, %1
991 $vgpr0_vgpr1 = COPY %2
995 name: extract_vector_elt_0_v16i64
999 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
1001 ; CHECK-LABEL: name: extract_vector_elt_0_v16i64
1002 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
1003 ; CHECK-NEXT: {{ $}}
1004 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<16 x s64>) = G_IMPLICIT_DEF
1005 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64), [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64), [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64), [[UV6:%[0-9]+]]:_(s64), [[UV7:%[0-9]+]]:_(s64), [[UV8:%[0-9]+]]:_(s64), [[UV9:%[0-9]+]]:_(s64), [[UV10:%[0-9]+]]:_(s64), [[UV11:%[0-9]+]]:_(s64), [[UV12:%[0-9]+]]:_(s64), [[UV13:%[0-9]+]]:_(s64), [[UV14:%[0-9]+]]:_(s64), [[UV15:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[DEF]](<16 x s64>)
1006 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[UV]](s64)
1007 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[COPY]](s64)
1008 %0:_(<16 x s64>) = G_IMPLICIT_DEF
1009 %1:_(s32) = G_CONSTANT i32 0
1010 %2:_(s64) = G_EXTRACT_VECTOR_ELT %0, %1
1011 $vgpr0_vgpr1 = COPY %2
1014 # Make sure we look through casts looking for a constant index.
1016 name: extract_vector_elt_look_through_trunc_0_v4i32
1020 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
1021 ; CHECK-LABEL: name: extract_vector_elt_look_through_trunc_0_v4i32
1022 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3
1023 ; CHECK-NEXT: {{ $}}
1024 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1025 ; 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>)
1026 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
1027 ; CHECK-NEXT: $vgpr0 = COPY [[COPY1]](s32)
1028 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1029 %1:_(s64) = G_CONSTANT i64 0
1030 %2:_(s32) = G_TRUNC %1
1031 %3:_(s32) = G_EXTRACT_VECTOR_ELT %0, %2
1036 name: extract_vector_elt_7_v64s32
1040 liveins: $sgpr0_sgpr1
1042 ; CHECK-LABEL: name: extract_vector_elt_7_v64s32
1043 ; CHECK: liveins: $sgpr0_sgpr1
1044 ; CHECK-NEXT: {{ $}}
1045 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
1046 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[COPY]](p1) :: (load (<16 x s32>), align 4, addrspace 4)
1047 ; 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 [[LOAD]](<16 x s32>)
1048 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
1049 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s32)
1050 %0:_(p1) = COPY $sgpr0_sgpr1
1051 %1:_(s32) = G_CONSTANT i32 7
1052 %2:_(<64 x s32>) = G_LOAD %0 :: (load (<64 x s32>), align 4, addrspace 4)
1053 %3:_(s32) = G_EXTRACT_VECTOR_ELT %2, %1
1054 S_ENDPGM 0, implicit %3
1058 name: extract_vector_elt_33_v64s32
1062 liveins: $sgpr0_sgpr1
1064 ; CHECK-LABEL: name: extract_vector_elt_33_v64s32
1065 ; CHECK: liveins: $sgpr0_sgpr1
1066 ; CHECK-NEXT: {{ $}}
1067 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
1068 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 128
1069 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
1070 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[PTR_ADD]](p1) :: (load (<16 x s32>) from unknown-address + 128, align 4, addrspace 4)
1071 ; 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 [[LOAD]](<16 x s32>)
1072 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
1073 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](s32)
1074 %0:_(p1) = COPY $sgpr0_sgpr1
1075 %1:_(s32) = G_CONSTANT i32 33
1076 %2:_(<64 x s32>) = G_LOAD %0 :: (load (<64 x s32>), align 4, addrspace 4)
1077 %3:_(s32) = G_EXTRACT_VECTOR_ELT %2, %1
1078 S_ENDPGM 0, implicit %3
1081 # Test handling of out of bounds indexes
1083 name: extract_vector_elt_64_65_v64s32
1087 liveins: $sgpr0_sgpr1
1089 ; CHECK-LABEL: name: extract_vector_elt_64_65_v64s32
1090 ; CHECK: liveins: $sgpr0_sgpr1
1091 ; CHECK-NEXT: {{ $}}
1092 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
1093 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
1094 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY]](s32), implicit [[DEF]](s32)
1095 %0:_(p1) = COPY $sgpr0_sgpr1
1096 %1:_(s32) = G_CONSTANT i32 64
1097 %2:_(<64 x s32>) = G_LOAD %0 :: (load (<64 x s32>), align 4, addrspace 4)
1098 %3:_(s32) = G_EXTRACT_VECTOR_ELT %2, %1
1099 %4:_(s32) = G_CONSTANT i32 65
1100 %5:_(s32) = G_EXTRACT_VECTOR_ELT %2, %4
1101 S_ENDPGM 0, implicit %3, implicit %5
1105 name: extract_vector_elt_33_v64p3
1109 liveins: $sgpr0_sgpr1
1111 ; CHECK-LABEL: name: extract_vector_elt_33_v64p3
1112 ; CHECK: liveins: $sgpr0_sgpr1
1113 ; CHECK-NEXT: {{ $}}
1114 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
1115 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 128
1116 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
1117 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[PTR_ADD]](p1) :: (load (<16 x s32>) from unknown-address + 128, align 4, addrspace 4)
1118 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<16 x p3>) = G_BITCAST [[LOAD]](<16 x s32>)
1119 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(p3), [[UV1:%[0-9]+]]:_(p3), [[UV2:%[0-9]+]]:_(p3), [[UV3:%[0-9]+]]:_(p3), [[UV4:%[0-9]+]]:_(p3), [[UV5:%[0-9]+]]:_(p3), [[UV6:%[0-9]+]]:_(p3), [[UV7:%[0-9]+]]:_(p3), [[UV8:%[0-9]+]]:_(p3), [[UV9:%[0-9]+]]:_(p3), [[UV10:%[0-9]+]]:_(p3), [[UV11:%[0-9]+]]:_(p3), [[UV12:%[0-9]+]]:_(p3), [[UV13:%[0-9]+]]:_(p3), [[UV14:%[0-9]+]]:_(p3), [[UV15:%[0-9]+]]:_(p3) = G_UNMERGE_VALUES [[BITCAST]](<16 x p3>)
1120 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p3) = COPY [[UV1]](p3)
1121 ; CHECK-NEXT: S_ENDPGM 0, implicit [[COPY1]](p3)
1122 %0:_(p1) = COPY $sgpr0_sgpr1
1123 %1:_(s32) = G_CONSTANT i32 33
1124 %2:_(<64 x p3>) = G_LOAD %0 :: (load (<64 x p3>), align 4, addrspace 4)
1125 %3:_(p3) = G_EXTRACT_VECTOR_ELT %2, %1
1126 S_ENDPGM 0, implicit %3
1130 name: extract_vector_elt_varidx_v64s32
1134 liveins: $sgpr0_sgpr1, $sgpr2
1136 ; CHECK-LABEL: name: extract_vector_elt_varidx_v64s32
1137 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2
1138 ; CHECK-NEXT: {{ $}}
1139 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $sgpr0_sgpr1
1140 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $sgpr2
1141 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[COPY]](p1) :: (load (<16 x s32>), align 4, addrspace 4)
1142 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
1143 ; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C]](s64)
1144 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[PTR_ADD]](p1) :: (load (<16 x s32>) from unknown-address + 64, align 4, addrspace 4)
1145 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 128
1146 ; CHECK-NEXT: [[PTR_ADD1:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C1]](s64)
1147 ; CHECK-NEXT: [[LOAD2:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[PTR_ADD1]](p1) :: (load (<16 x s32>) from unknown-address + 128, align 4, addrspace 4)
1148 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 192
1149 ; CHECK-NEXT: [[PTR_ADD2:%[0-9]+]]:_(p1) = G_PTR_ADD [[COPY]], [[C2]](s64)
1150 ; CHECK-NEXT: [[LOAD3:%[0-9]+]]:_(<16 x s32>) = G_LOAD [[PTR_ADD2]](p1) :: (load (<16 x s32>) from unknown-address + 192, align 4, addrspace 4)
1151 ; CHECK-NEXT: [[FRAME_INDEX:%[0-9]+]]:_(p5) = G_FRAME_INDEX %stack.0
1152 ; 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 [[LOAD]](<16 x s32>)
1153 ; 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 [[LOAD1]](<16 x s32>)
1154 ; 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 [[LOAD2]](<16 x s32>)
1155 ; 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 [[LOAD3]](<16 x s32>)
1156 ; CHECK-NEXT: G_STORE [[UV]](s32), [[FRAME_INDEX]](p5) :: (store (s32) into %stack.0, align 256, addrspace 5)
1157 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
1158 ; CHECK-NEXT: [[PTR_ADD3:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C3]](s32)
1159 ; CHECK-NEXT: G_STORE [[UV1]](s32), [[PTR_ADD3]](p5) :: (store (s32) into %stack.0 + 4, basealign 256, addrspace 5)
1160 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1161 ; CHECK-NEXT: [[PTR_ADD4:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C4]](s32)
1162 ; CHECK-NEXT: G_STORE [[UV2]](s32), [[PTR_ADD4]](p5) :: (store (s32) into %stack.0 + 8, align 8, basealign 256, addrspace 5)
1163 ; CHECK-NEXT: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
1164 ; CHECK-NEXT: [[PTR_ADD5:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C5]](s32)
1165 ; CHECK-NEXT: G_STORE [[UV3]](s32), [[PTR_ADD5]](p5) :: (store (s32) into %stack.0 + 12, basealign 256, addrspace 5)
1166 ; CHECK-NEXT: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1167 ; CHECK-NEXT: [[PTR_ADD6:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C6]](s32)
1168 ; CHECK-NEXT: G_STORE [[UV4]](s32), [[PTR_ADD6]](p5) :: (store (s32) into %stack.0 + 16, align 16, basealign 256, addrspace 5)
1169 ; CHECK-NEXT: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
1170 ; CHECK-NEXT: [[PTR_ADD7:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C7]](s32)
1171 ; CHECK-NEXT: G_STORE [[UV5]](s32), [[PTR_ADD7]](p5) :: (store (s32) into %stack.0 + 20, basealign 256, addrspace 5)
1172 ; CHECK-NEXT: [[C8:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1173 ; CHECK-NEXT: [[PTR_ADD8:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C8]](s32)
1174 ; CHECK-NEXT: G_STORE [[UV6]](s32), [[PTR_ADD8]](p5) :: (store (s32) into %stack.0 + 24, align 8, basealign 256, addrspace 5)
1175 ; CHECK-NEXT: [[C9:%[0-9]+]]:_(s32) = G_CONSTANT i32 28
1176 ; CHECK-NEXT: [[PTR_ADD9:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C9]](s32)
1177 ; CHECK-NEXT: G_STORE [[UV7]](s32), [[PTR_ADD9]](p5) :: (store (s32) into %stack.0 + 28, basealign 256, addrspace 5)
1178 ; CHECK-NEXT: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 32
1179 ; CHECK-NEXT: [[PTR_ADD10:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C10]](s32)
1180 ; CHECK-NEXT: G_STORE [[UV8]](s32), [[PTR_ADD10]](p5) :: (store (s32) into %stack.0 + 32, align 32, basealign 256, addrspace 5)
1181 ; CHECK-NEXT: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 36
1182 ; CHECK-NEXT: [[PTR_ADD11:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C11]](s32)
1183 ; CHECK-NEXT: G_STORE [[UV9]](s32), [[PTR_ADD11]](p5) :: (store (s32) into %stack.0 + 36, basealign 256, addrspace 5)
1184 ; CHECK-NEXT: [[C12:%[0-9]+]]:_(s32) = G_CONSTANT i32 40
1185 ; CHECK-NEXT: [[PTR_ADD12:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C12]](s32)
1186 ; CHECK-NEXT: G_STORE [[UV10]](s32), [[PTR_ADD12]](p5) :: (store (s32) into %stack.0 + 40, align 8, basealign 256, addrspace 5)
1187 ; CHECK-NEXT: [[C13:%[0-9]+]]:_(s32) = G_CONSTANT i32 44
1188 ; CHECK-NEXT: [[PTR_ADD13:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C13]](s32)
1189 ; CHECK-NEXT: G_STORE [[UV11]](s32), [[PTR_ADD13]](p5) :: (store (s32) into %stack.0 + 44, basealign 256, addrspace 5)
1190 ; CHECK-NEXT: [[C14:%[0-9]+]]:_(s32) = G_CONSTANT i32 48
1191 ; CHECK-NEXT: [[PTR_ADD14:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C14]](s32)
1192 ; CHECK-NEXT: G_STORE [[UV12]](s32), [[PTR_ADD14]](p5) :: (store (s32) into %stack.0 + 48, align 16, basealign 256, addrspace 5)
1193 ; CHECK-NEXT: [[C15:%[0-9]+]]:_(s32) = G_CONSTANT i32 52
1194 ; CHECK-NEXT: [[PTR_ADD15:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C15]](s32)
1195 ; CHECK-NEXT: G_STORE [[UV13]](s32), [[PTR_ADD15]](p5) :: (store (s32) into %stack.0 + 52, basealign 256, addrspace 5)
1196 ; CHECK-NEXT: [[C16:%[0-9]+]]:_(s32) = G_CONSTANT i32 56
1197 ; CHECK-NEXT: [[PTR_ADD16:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C16]](s32)
1198 ; CHECK-NEXT: G_STORE [[UV14]](s32), [[PTR_ADD16]](p5) :: (store (s32) into %stack.0 + 56, align 8, basealign 256, addrspace 5)
1199 ; CHECK-NEXT: [[C17:%[0-9]+]]:_(s32) = G_CONSTANT i32 60
1200 ; CHECK-NEXT: [[PTR_ADD17:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C17]](s32)
1201 ; CHECK-NEXT: G_STORE [[UV15]](s32), [[PTR_ADD17]](p5) :: (store (s32) into %stack.0 + 60, basealign 256, addrspace 5)
1202 ; CHECK-NEXT: [[C18:%[0-9]+]]:_(s32) = G_CONSTANT i32 64
1203 ; CHECK-NEXT: [[PTR_ADD18:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C18]](s32)
1204 ; CHECK-NEXT: G_STORE [[UV16]](s32), [[PTR_ADD18]](p5) :: (store (s32) into %stack.0 + 64, align 64, basealign 256, addrspace 5)
1205 ; CHECK-NEXT: [[C19:%[0-9]+]]:_(s32) = G_CONSTANT i32 68
1206 ; CHECK-NEXT: [[PTR_ADD19:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C19]](s32)
1207 ; CHECK-NEXT: G_STORE [[UV17]](s32), [[PTR_ADD19]](p5) :: (store (s32) into %stack.0 + 68, basealign 256, addrspace 5)
1208 ; CHECK-NEXT: [[C20:%[0-9]+]]:_(s32) = G_CONSTANT i32 72
1209 ; CHECK-NEXT: [[PTR_ADD20:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C20]](s32)
1210 ; CHECK-NEXT: G_STORE [[UV18]](s32), [[PTR_ADD20]](p5) :: (store (s32) into %stack.0 + 72, align 8, basealign 256, addrspace 5)
1211 ; CHECK-NEXT: [[C21:%[0-9]+]]:_(s32) = G_CONSTANT i32 76
1212 ; CHECK-NEXT: [[PTR_ADD21:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C21]](s32)
1213 ; CHECK-NEXT: G_STORE [[UV19]](s32), [[PTR_ADD21]](p5) :: (store (s32) into %stack.0 + 76, basealign 256, addrspace 5)
1214 ; CHECK-NEXT: [[C22:%[0-9]+]]:_(s32) = G_CONSTANT i32 80
1215 ; CHECK-NEXT: [[PTR_ADD22:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C22]](s32)
1216 ; CHECK-NEXT: G_STORE [[UV20]](s32), [[PTR_ADD22]](p5) :: (store (s32) into %stack.0 + 80, align 16, basealign 256, addrspace 5)
1217 ; CHECK-NEXT: [[C23:%[0-9]+]]:_(s32) = G_CONSTANT i32 84
1218 ; CHECK-NEXT: [[PTR_ADD23:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C23]](s32)
1219 ; CHECK-NEXT: G_STORE [[UV21]](s32), [[PTR_ADD23]](p5) :: (store (s32) into %stack.0 + 84, basealign 256, addrspace 5)
1220 ; CHECK-NEXT: [[C24:%[0-9]+]]:_(s32) = G_CONSTANT i32 88
1221 ; CHECK-NEXT: [[PTR_ADD24:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C24]](s32)
1222 ; CHECK-NEXT: G_STORE [[UV22]](s32), [[PTR_ADD24]](p5) :: (store (s32) into %stack.0 + 88, align 8, basealign 256, addrspace 5)
1223 ; CHECK-NEXT: [[C25:%[0-9]+]]:_(s32) = G_CONSTANT i32 92
1224 ; CHECK-NEXT: [[PTR_ADD25:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C25]](s32)
1225 ; CHECK-NEXT: G_STORE [[UV23]](s32), [[PTR_ADD25]](p5) :: (store (s32) into %stack.0 + 92, basealign 256, addrspace 5)
1226 ; CHECK-NEXT: [[C26:%[0-9]+]]:_(s32) = G_CONSTANT i32 96
1227 ; CHECK-NEXT: [[PTR_ADD26:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C26]](s32)
1228 ; CHECK-NEXT: G_STORE [[UV24]](s32), [[PTR_ADD26]](p5) :: (store (s32) into %stack.0 + 96, align 32, basealign 256, addrspace 5)
1229 ; CHECK-NEXT: [[C27:%[0-9]+]]:_(s32) = G_CONSTANT i32 100
1230 ; CHECK-NEXT: [[PTR_ADD27:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C27]](s32)
1231 ; CHECK-NEXT: G_STORE [[UV25]](s32), [[PTR_ADD27]](p5) :: (store (s32) into %stack.0 + 100, basealign 256, addrspace 5)
1232 ; CHECK-NEXT: [[C28:%[0-9]+]]:_(s32) = G_CONSTANT i32 104
1233 ; CHECK-NEXT: [[PTR_ADD28:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C28]](s32)
1234 ; CHECK-NEXT: G_STORE [[UV26]](s32), [[PTR_ADD28]](p5) :: (store (s32) into %stack.0 + 104, align 8, basealign 256, addrspace 5)
1235 ; CHECK-NEXT: [[C29:%[0-9]+]]:_(s32) = G_CONSTANT i32 108
1236 ; CHECK-NEXT: [[PTR_ADD29:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C29]](s32)
1237 ; CHECK-NEXT: G_STORE [[UV27]](s32), [[PTR_ADD29]](p5) :: (store (s32) into %stack.0 + 108, basealign 256, addrspace 5)
1238 ; CHECK-NEXT: [[C30:%[0-9]+]]:_(s32) = G_CONSTANT i32 112
1239 ; CHECK-NEXT: [[PTR_ADD30:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C30]](s32)
1240 ; CHECK-NEXT: G_STORE [[UV28]](s32), [[PTR_ADD30]](p5) :: (store (s32) into %stack.0 + 112, align 16, basealign 256, addrspace 5)
1241 ; CHECK-NEXT: [[C31:%[0-9]+]]:_(s32) = G_CONSTANT i32 116
1242 ; CHECK-NEXT: [[PTR_ADD31:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C31]](s32)
1243 ; CHECK-NEXT: G_STORE [[UV29]](s32), [[PTR_ADD31]](p5) :: (store (s32) into %stack.0 + 116, basealign 256, addrspace 5)
1244 ; CHECK-NEXT: [[C32:%[0-9]+]]:_(s32) = G_CONSTANT i32 120
1245 ; CHECK-NEXT: [[PTR_ADD32:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C32]](s32)
1246 ; CHECK-NEXT: G_STORE [[UV30]](s32), [[PTR_ADD32]](p5) :: (store (s32) into %stack.0 + 120, align 8, basealign 256, addrspace 5)
1247 ; CHECK-NEXT: [[C33:%[0-9]+]]:_(s32) = G_CONSTANT i32 124
1248 ; CHECK-NEXT: [[PTR_ADD33:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C33]](s32)
1249 ; CHECK-NEXT: G_STORE [[UV31]](s32), [[PTR_ADD33]](p5) :: (store (s32) into %stack.0 + 124, basealign 256, addrspace 5)
1250 ; CHECK-NEXT: [[C34:%[0-9]+]]:_(s32) = G_CONSTANT i32 128
1251 ; CHECK-NEXT: [[PTR_ADD34:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C34]](s32)
1252 ; CHECK-NEXT: G_STORE [[UV32]](s32), [[PTR_ADD34]](p5) :: (store (s32) into %stack.0 + 128, align 128, basealign 256, addrspace 5)
1253 ; CHECK-NEXT: [[C35:%[0-9]+]]:_(s32) = G_CONSTANT i32 132
1254 ; CHECK-NEXT: [[PTR_ADD35:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C35]](s32)
1255 ; CHECK-NEXT: G_STORE [[UV33]](s32), [[PTR_ADD35]](p5) :: (store (s32) into %stack.0 + 132, basealign 256, addrspace 5)
1256 ; CHECK-NEXT: [[C36:%[0-9]+]]:_(s32) = G_CONSTANT i32 136
1257 ; CHECK-NEXT: [[PTR_ADD36:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C36]](s32)
1258 ; CHECK-NEXT: G_STORE [[UV34]](s32), [[PTR_ADD36]](p5) :: (store (s32) into %stack.0 + 136, align 8, basealign 256, addrspace 5)
1259 ; CHECK-NEXT: [[C37:%[0-9]+]]:_(s32) = G_CONSTANT i32 140
1260 ; CHECK-NEXT: [[PTR_ADD37:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C37]](s32)
1261 ; CHECK-NEXT: G_STORE [[UV35]](s32), [[PTR_ADD37]](p5) :: (store (s32) into %stack.0 + 140, basealign 256, addrspace 5)
1262 ; CHECK-NEXT: [[C38:%[0-9]+]]:_(s32) = G_CONSTANT i32 144
1263 ; CHECK-NEXT: [[PTR_ADD38:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C38]](s32)
1264 ; CHECK-NEXT: G_STORE [[UV36]](s32), [[PTR_ADD38]](p5) :: (store (s32) into %stack.0 + 144, align 16, basealign 256, addrspace 5)
1265 ; CHECK-NEXT: [[C39:%[0-9]+]]:_(s32) = G_CONSTANT i32 148
1266 ; CHECK-NEXT: [[PTR_ADD39:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C39]](s32)
1267 ; CHECK-NEXT: G_STORE [[UV37]](s32), [[PTR_ADD39]](p5) :: (store (s32) into %stack.0 + 148, basealign 256, addrspace 5)
1268 ; CHECK-NEXT: [[C40:%[0-9]+]]:_(s32) = G_CONSTANT i32 152
1269 ; CHECK-NEXT: [[PTR_ADD40:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C40]](s32)
1270 ; CHECK-NEXT: G_STORE [[UV38]](s32), [[PTR_ADD40]](p5) :: (store (s32) into %stack.0 + 152, align 8, basealign 256, addrspace 5)
1271 ; CHECK-NEXT: [[C41:%[0-9]+]]:_(s32) = G_CONSTANT i32 156
1272 ; CHECK-NEXT: [[PTR_ADD41:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C41]](s32)
1273 ; CHECK-NEXT: G_STORE [[UV39]](s32), [[PTR_ADD41]](p5) :: (store (s32) into %stack.0 + 156, basealign 256, addrspace 5)
1274 ; CHECK-NEXT: [[C42:%[0-9]+]]:_(s32) = G_CONSTANT i32 160
1275 ; CHECK-NEXT: [[PTR_ADD42:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C42]](s32)
1276 ; CHECK-NEXT: G_STORE [[UV40]](s32), [[PTR_ADD42]](p5) :: (store (s32) into %stack.0 + 160, align 32, basealign 256, addrspace 5)
1277 ; CHECK-NEXT: [[C43:%[0-9]+]]:_(s32) = G_CONSTANT i32 164
1278 ; CHECK-NEXT: [[PTR_ADD43:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C43]](s32)
1279 ; CHECK-NEXT: G_STORE [[UV41]](s32), [[PTR_ADD43]](p5) :: (store (s32) into %stack.0 + 164, basealign 256, addrspace 5)
1280 ; CHECK-NEXT: [[C44:%[0-9]+]]:_(s32) = G_CONSTANT i32 168
1281 ; CHECK-NEXT: [[PTR_ADD44:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C44]](s32)
1282 ; CHECK-NEXT: G_STORE [[UV42]](s32), [[PTR_ADD44]](p5) :: (store (s32) into %stack.0 + 168, align 8, basealign 256, addrspace 5)
1283 ; CHECK-NEXT: [[C45:%[0-9]+]]:_(s32) = G_CONSTANT i32 172
1284 ; CHECK-NEXT: [[PTR_ADD45:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C45]](s32)
1285 ; CHECK-NEXT: G_STORE [[UV43]](s32), [[PTR_ADD45]](p5) :: (store (s32) into %stack.0 + 172, basealign 256, addrspace 5)
1286 ; CHECK-NEXT: [[C46:%[0-9]+]]:_(s32) = G_CONSTANT i32 176
1287 ; CHECK-NEXT: [[PTR_ADD46:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C46]](s32)
1288 ; CHECK-NEXT: G_STORE [[UV44]](s32), [[PTR_ADD46]](p5) :: (store (s32) into %stack.0 + 176, align 16, basealign 256, addrspace 5)
1289 ; CHECK-NEXT: [[C47:%[0-9]+]]:_(s32) = G_CONSTANT i32 180
1290 ; CHECK-NEXT: [[PTR_ADD47:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C47]](s32)
1291 ; CHECK-NEXT: G_STORE [[UV45]](s32), [[PTR_ADD47]](p5) :: (store (s32) into %stack.0 + 180, basealign 256, addrspace 5)
1292 ; CHECK-NEXT: [[C48:%[0-9]+]]:_(s32) = G_CONSTANT i32 184
1293 ; CHECK-NEXT: [[PTR_ADD48:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C48]](s32)
1294 ; CHECK-NEXT: G_STORE [[UV46]](s32), [[PTR_ADD48]](p5) :: (store (s32) into %stack.0 + 184, align 8, basealign 256, addrspace 5)
1295 ; CHECK-NEXT: [[C49:%[0-9]+]]:_(s32) = G_CONSTANT i32 188
1296 ; CHECK-NEXT: [[PTR_ADD49:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C49]](s32)
1297 ; CHECK-NEXT: G_STORE [[UV47]](s32), [[PTR_ADD49]](p5) :: (store (s32) into %stack.0 + 188, basealign 256, addrspace 5)
1298 ; CHECK-NEXT: [[C50:%[0-9]+]]:_(s32) = G_CONSTANT i32 192
1299 ; CHECK-NEXT: [[PTR_ADD50:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C50]](s32)
1300 ; CHECK-NEXT: G_STORE [[UV48]](s32), [[PTR_ADD50]](p5) :: (store (s32) into %stack.0 + 192, align 64, basealign 256, addrspace 5)
1301 ; CHECK-NEXT: [[C51:%[0-9]+]]:_(s32) = G_CONSTANT i32 196
1302 ; CHECK-NEXT: [[PTR_ADD51:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C51]](s32)
1303 ; CHECK-NEXT: G_STORE [[UV49]](s32), [[PTR_ADD51]](p5) :: (store (s32) into %stack.0 + 196, basealign 256, addrspace 5)
1304 ; CHECK-NEXT: [[C52:%[0-9]+]]:_(s32) = G_CONSTANT i32 200
1305 ; CHECK-NEXT: [[PTR_ADD52:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C52]](s32)
1306 ; CHECK-NEXT: G_STORE [[UV50]](s32), [[PTR_ADD52]](p5) :: (store (s32) into %stack.0 + 200, align 8, basealign 256, addrspace 5)
1307 ; CHECK-NEXT: [[C53:%[0-9]+]]:_(s32) = G_CONSTANT i32 204
1308 ; CHECK-NEXT: [[PTR_ADD53:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C53]](s32)
1309 ; CHECK-NEXT: G_STORE [[UV51]](s32), [[PTR_ADD53]](p5) :: (store (s32) into %stack.0 + 204, basealign 256, addrspace 5)
1310 ; CHECK-NEXT: [[C54:%[0-9]+]]:_(s32) = G_CONSTANT i32 208
1311 ; CHECK-NEXT: [[PTR_ADD54:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C54]](s32)
1312 ; CHECK-NEXT: G_STORE [[UV52]](s32), [[PTR_ADD54]](p5) :: (store (s32) into %stack.0 + 208, align 16, basealign 256, addrspace 5)
1313 ; CHECK-NEXT: [[C55:%[0-9]+]]:_(s32) = G_CONSTANT i32 212
1314 ; CHECK-NEXT: [[PTR_ADD55:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C55]](s32)
1315 ; CHECK-NEXT: G_STORE [[UV53]](s32), [[PTR_ADD55]](p5) :: (store (s32) into %stack.0 + 212, basealign 256, addrspace 5)
1316 ; CHECK-NEXT: [[C56:%[0-9]+]]:_(s32) = G_CONSTANT i32 216
1317 ; CHECK-NEXT: [[PTR_ADD56:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C56]](s32)
1318 ; CHECK-NEXT: G_STORE [[UV54]](s32), [[PTR_ADD56]](p5) :: (store (s32) into %stack.0 + 216, align 8, basealign 256, addrspace 5)
1319 ; CHECK-NEXT: [[C57:%[0-9]+]]:_(s32) = G_CONSTANT i32 220
1320 ; CHECK-NEXT: [[PTR_ADD57:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C57]](s32)
1321 ; CHECK-NEXT: G_STORE [[UV55]](s32), [[PTR_ADD57]](p5) :: (store (s32) into %stack.0 + 220, basealign 256, addrspace 5)
1322 ; CHECK-NEXT: [[C58:%[0-9]+]]:_(s32) = G_CONSTANT i32 224
1323 ; CHECK-NEXT: [[PTR_ADD58:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C58]](s32)
1324 ; CHECK-NEXT: G_STORE [[UV56]](s32), [[PTR_ADD58]](p5) :: (store (s32) into %stack.0 + 224, align 32, basealign 256, addrspace 5)
1325 ; CHECK-NEXT: [[C59:%[0-9]+]]:_(s32) = G_CONSTANT i32 228
1326 ; CHECK-NEXT: [[PTR_ADD59:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C59]](s32)
1327 ; CHECK-NEXT: G_STORE [[UV57]](s32), [[PTR_ADD59]](p5) :: (store (s32) into %stack.0 + 228, basealign 256, addrspace 5)
1328 ; CHECK-NEXT: [[C60:%[0-9]+]]:_(s32) = G_CONSTANT i32 232
1329 ; CHECK-NEXT: [[PTR_ADD60:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C60]](s32)
1330 ; CHECK-NEXT: G_STORE [[UV58]](s32), [[PTR_ADD60]](p5) :: (store (s32) into %stack.0 + 232, align 8, basealign 256, addrspace 5)
1331 ; CHECK-NEXT: [[C61:%[0-9]+]]:_(s32) = G_CONSTANT i32 236
1332 ; CHECK-NEXT: [[PTR_ADD61:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C61]](s32)
1333 ; CHECK-NEXT: G_STORE [[UV59]](s32), [[PTR_ADD61]](p5) :: (store (s32) into %stack.0 + 236, basealign 256, addrspace 5)
1334 ; CHECK-NEXT: [[C62:%[0-9]+]]:_(s32) = G_CONSTANT i32 240
1335 ; CHECK-NEXT: [[PTR_ADD62:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C62]](s32)
1336 ; CHECK-NEXT: G_STORE [[UV60]](s32), [[PTR_ADD62]](p5) :: (store (s32) into %stack.0 + 240, align 16, basealign 256, addrspace 5)
1337 ; CHECK-NEXT: [[C63:%[0-9]+]]:_(s32) = G_CONSTANT i32 244
1338 ; CHECK-NEXT: [[PTR_ADD63:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C63]](s32)
1339 ; CHECK-NEXT: G_STORE [[UV61]](s32), [[PTR_ADD63]](p5) :: (store (s32) into %stack.0 + 244, basealign 256, addrspace 5)
1340 ; CHECK-NEXT: [[C64:%[0-9]+]]:_(s32) = G_CONSTANT i32 248
1341 ; CHECK-NEXT: [[PTR_ADD64:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C64]](s32)
1342 ; CHECK-NEXT: G_STORE [[UV62]](s32), [[PTR_ADD64]](p5) :: (store (s32) into %stack.0 + 248, align 8, basealign 256, addrspace 5)
1343 ; CHECK-NEXT: [[C65:%[0-9]+]]:_(s32) = G_CONSTANT i32 252
1344 ; CHECK-NEXT: [[PTR_ADD65:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[C65]](s32)
1345 ; CHECK-NEXT: G_STORE [[UV63]](s32), [[PTR_ADD65]](p5) :: (store (s32) into %stack.0 + 252, basealign 256, addrspace 5)
1346 ; CHECK-NEXT: [[C66:%[0-9]+]]:_(s32) = G_CONSTANT i32 63
1347 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C66]]
1348 ; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s32) = G_MUL [[AND]], [[C3]]
1349 ; CHECK-NEXT: [[PTR_ADD66:%[0-9]+]]:_(p5) = G_PTR_ADD [[FRAME_INDEX]], [[MUL]](s32)
1350 ; CHECK-NEXT: [[LOAD4:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD66]](p5) :: (load (s32), addrspace 5)
1351 ; CHECK-NEXT: S_ENDPGM 0, implicit [[LOAD4]](s32)
1352 %0:_(p1) = COPY $sgpr0_sgpr1
1353 %1:_(s32) = COPY $sgpr2
1354 %2:_(<64 x s32>) = G_LOAD %0 :: (load (<64 x s32>), align 4, addrspace 4)
1355 %3:_(s32) = G_EXTRACT_VECTOR_ELT %2, %1
1356 S_ENDPGM 0, implicit %3
1360 name: extract_vector_elt_v32s1_varidx_i32
1364 liveins: $vgpr0, $vgpr1
1366 ; CHECK-LABEL: name: extract_vector_elt_v32s1_varidx_i32
1367 ; CHECK: liveins: $vgpr0, $vgpr1
1368 ; CHECK-NEXT: {{ $}}
1369 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1370 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1371 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
1372 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1373 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1374 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1375 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[SHL]](s32)
1376 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR]](s32)
1377 %0:_(s32) = COPY $vgpr0
1378 %1:_(s32) = COPY $vgpr1
1379 %2:_(<32 x s1>) = G_BITCAST %0
1380 %3:_(s1) = G_EXTRACT_VECTOR_ELT %2, %1
1381 %4:_(s32) = G_ANYEXT %3
1386 name: extract_vector_elt_v12s8_varidx_s32
1390 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
1391 ; CHECK-LABEL: name: extract_vector_elt_v12s8_varidx_s32
1392 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
1393 ; CHECK-NEXT: {{ $}}
1394 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1395 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
1396 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
1397 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1398 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[COPY]](<3 x s32>), [[LSHR]](s32)
1399 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
1400 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1401 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1402 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[EVEC]], [[SHL]](s32)
1403 ; CHECK-NEXT: $vgpr0 = COPY [[LSHR1]](s32)
1404 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1405 %1:_(<12 x s8>) = G_BITCAST %0
1406 %2:_(s32) = COPY $vgpr3
1407 %3:_(s8) = G_EXTRACT_VECTOR_ELT %1, %2
1408 %4:_(s32) = G_ANYEXT %3
1413 name: extract_vector_elt_v3s8_varidx_s32
1417 liveins: $vgpr0, $vgpr1
1418 ; CHECK-LABEL: name: extract_vector_elt_v3s8_varidx_s32
1419 ; CHECK: liveins: $vgpr0, $vgpr1
1420 ; CHECK-NEXT: {{ $}}
1421 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1422 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1423 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1424 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
1425 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1426 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
1427 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[LSHR]](s32), [[LSHR1]](s32)
1428 ; CHECK-NEXT: [[EVEC:%[0-9]+]]:_(s32) = G_EXTRACT_VECTOR_ELT [[BUILD_VECTOR]](<3 x s32>), [[COPY1]](s32)
1429 ; CHECK-NEXT: $vgpr0 = COPY [[EVEC]](s32)
1430 %0:_(s32) = COPY $vgpr0
1431 %1:_(s32) = COPY $vgpr1
1432 %2:_(s24) = G_TRUNC %0
1433 %3:_(<3 x s8>) = G_BITCAST %2
1434 %4:_(s8) = G_EXTRACT_VECTOR_ELT %3, %1
1435 %5:_(s32) = G_ANYEXT %4