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 -global-isel-abort=0 %s -o - | FileCheck %s
5 name: test_extract_s32_s64_offset0
10 ; CHECK-LABEL: name: test_extract_s32_s64_offset0
11 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
12 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s64), 0
13 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
14 %0:_(s64) = COPY $vgpr0_vgpr1
15 %1:_(s32) = G_EXTRACT %0, 0
19 name: test_extract_s32_s64_offset32
24 ; CHECK-LABEL: name: test_extract_s32_s64_offset32
25 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
26 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s64), 32
27 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
28 %0:_(s64) = COPY $vgpr0_vgpr1
29 %1:_(s32) = G_EXTRACT %0, 32
34 name: test_extract_s8_s15_offset0
39 ; CHECK-LABEL: name: test_extract_s8_s15_offset0
40 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
41 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
42 ; CHECK: $vgpr0 = COPY [[TRUNC]](s32)
43 %0:_(s64) = COPY $vgpr0_vgpr1
44 %1:_(s31) = G_TRUNC %0
45 %2:_(s8) = G_EXTRACT %1, 0
46 %3:_(s32) = G_ANYEXT %2
51 name: test_extract_s16_s31_offset0
56 ; CHECK-LABEL: name: test_extract_s16_s31_offset0
57 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
58 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
59 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](s32), 0
60 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
61 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
62 %0:_(s64) = COPY $vgpr0_vgpr1
63 %1:_(s31) = G_TRUNC %0
64 %2:_(s16) = G_EXTRACT %1, 0
65 %3:_(s32) = G_ANYEXT %2
70 name: test_extract_s32_s48_offset0
75 ; CHECK-LABEL: name: test_extract_s32_s48_offset0
76 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
77 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
78 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](s64), 0
79 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
80 %0:_(s64) = COPY $vgpr0_vgpr1
81 %1:_(s48) = G_TRUNC %0
82 %2:_(s32) = G_EXTRACT %1, 0
87 name: test_extract_s32_s96_offset0
90 liveins: $vgpr0_vgpr1_vgpr2
92 ; CHECK-LABEL: name: test_extract_s32_s96_offset0
93 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
94 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 0
95 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
96 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
97 %1:_(s32) = G_EXTRACT %0, 0
101 name: test_extract_s32_s96_offset32
104 liveins: $vgpr0_vgpr1_vgpr2
106 ; CHECK-LABEL: name: test_extract_s32_s96_offset32
107 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
108 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 32
109 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
110 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
111 %1:_(s32) = G_EXTRACT %0, 32
115 name: test_extract_s32_s96_offset64
118 liveins: $vgpr0_vgpr1_vgpr2
120 ; CHECK-LABEL: name: test_extract_s32_s96_offset64
121 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
122 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 64
123 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
124 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
125 %1:_(s32) = G_EXTRACT %0, 64
129 name: test_extract_s32_s128_offset0
132 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
134 ; CHECK-LABEL: name: test_extract_s32_s128_offset0
135 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
136 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 0
137 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
138 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
139 %1:_(s32) = G_EXTRACT %0, 0
143 name: test_extract_s32_s128_offset32
146 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
148 ; CHECK-LABEL: name: test_extract_s32_s128_offset32
149 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
150 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 32
151 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
152 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
153 %1:_(s32) = G_EXTRACT %0, 32
157 name: test_extract_s32_s128_offset64
160 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
162 ; CHECK-LABEL: name: test_extract_s32_s128_offset64
163 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
164 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 64
165 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
166 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
167 %1:_(s32) = G_EXTRACT %0, 64
171 name: test_extract_s32_s128_offset96
174 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
176 ; CHECK-LABEL: name: test_extract_s32_s128_offset96
177 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
178 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 96
179 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
180 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
181 %1:_(s32) = G_EXTRACT %0, 96
186 name: test_extract_s32_v2s32_offset0
189 liveins: $vgpr0_vgpr1
191 ; CHECK-LABEL: name: test_extract_s32_v2s32_offset0
192 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
193 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<2 x s32>), 0
194 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
195 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
196 %1:_(s32) = G_EXTRACT %0, 0
200 name: test_extract_s32_v2s32_offset32
203 liveins: $vgpr0_vgpr1
205 ; CHECK-LABEL: name: test_extract_s32_v2s32_offset32
206 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
207 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<2 x s32>), 32
208 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
209 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
210 %1:_(s32) = G_EXTRACT %0, 32
214 name: test_extract_s32_v3s32_offset0
217 liveins: $vgpr0_vgpr1_vgpr2
219 ; CHECK-LABEL: name: test_extract_s32_v3s32_offset0
220 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
221 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 0
222 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
223 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
224 %1:_(s32) = G_EXTRACT %0, 0
228 name: test_extract_s32_v3s32_offset32
231 liveins: $vgpr0_vgpr1_vgpr2
233 ; CHECK-LABEL: name: test_extract_s32_v3s32_offset32
234 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
235 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 32
236 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
237 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
238 %1:_(s32) = G_EXTRACT %0, 32
242 name: test_extract_s32_v3s32_offset64
245 liveins: $vgpr0_vgpr1_vgpr2
247 ; CHECK-LABEL: name: test_extract_s32_v3s32_offset64
248 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
249 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<3 x s32>), 64
250 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
251 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
252 %1:_(s32) = G_EXTRACT %0, 64
256 name: test_extract_s32_v4s32_offset0
259 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
261 ; CHECK-LABEL: name: test_extract_s32_v4s32_offset0
262 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
263 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](<4 x s32>), 0
264 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
265 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
266 %1:_(s32) = G_EXTRACT %0, 0
270 name: test_extract_s32_v4s32_offset32
273 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
275 ; CHECK-LABEL: name: test_extract_s32_v4s32_offset32
276 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
277 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 32
278 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
279 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
280 %1:_(s32) = G_EXTRACT %0, 32
284 name: test_extract_s32_v4s32_offset64
287 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
289 ; CHECK-LABEL: name: test_extract_s32_v4s32_offset64
290 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
291 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 64
292 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
293 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
294 %1:_(s32) = G_EXTRACT %0, 64
298 name: test_extract_s32_v4s32_offset96
301 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
303 ; CHECK-LABEL: name: test_extract_s32_v4s32_offset96
304 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
305 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s128), 96
306 ; CHECK: $vgpr0 = COPY [[EXTRACT]](s32)
307 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
308 %1:_(s32) = G_EXTRACT %0, 96
312 name: test_extract_v2s32_v4s32_offset0
315 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
317 ; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset0
318 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
319 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 0
320 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
321 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
322 %1:_(<2 x s32>) = G_EXTRACT %0, 0
323 $vgpr0_vgpr1 = COPY %1
327 name: test_extract_v2s32_v4s32_offset32
330 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
332 ; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset32
333 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
334 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 32
335 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
336 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
337 %1:_(<2 x s32>) = G_EXTRACT %0, 32
338 $vgpr0_vgpr1 = COPY %1
342 name: test_extract_v2s32_v4s32_offset64
345 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
347 ; CHECK-LABEL: name: test_extract_v2s32_v4s32_offset64
348 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
349 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s32>) = G_EXTRACT [[COPY]](<4 x s32>), 64
350 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](<2 x s32>)
351 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
352 %1:_(<2 x s32>) = G_EXTRACT %0, 64
353 $vgpr0_vgpr1 = COPY %1
356 name: test_extract_s64_v4s32_offset0
359 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
361 ; CHECK-LABEL: name: test_extract_s64_v4s32_offset0
362 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
363 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 0
364 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
365 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
366 %1:_(s64) = G_EXTRACT %0, 0
367 $vgpr0_vgpr1 = COPY %1
371 name: test_extract_s64_v4s32_offset32
374 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
376 ; CHECK-LABEL: name: test_extract_s64_v4s32_offset32
377 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
378 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 32
379 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
380 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
381 %1:_(s64) = G_EXTRACT %0, 32
382 $vgpr0_vgpr1 = COPY %1
386 name: test_extract_s64_v4s32_offset64
389 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
391 ; CHECK-LABEL: name: test_extract_s64_v4s32_offset64
392 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
393 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](<4 x s32>), 64
394 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](s64)
395 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
396 %1:_(s64) = G_EXTRACT %0, 64
397 $vgpr0_vgpr1 = COPY %1
400 name: test_extract_p0_v4s32_offset0
403 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
405 ; CHECK-LABEL: name: test_extract_p0_v4s32_offset0
406 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
407 ; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 0
408 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
409 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
410 %1:_(p0) = G_EXTRACT %0, 0
411 $vgpr0_vgpr1 = COPY %1
415 name: test_extract_p0_v4s32_offset32
418 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
420 ; CHECK-LABEL: name: test_extract_p0_v4s32_offset32
421 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
422 ; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 32
423 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
424 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
425 %1:_(p0) = G_EXTRACT %0, 32
426 $vgpr0_vgpr1 = COPY %1
430 name: test_extract_p0_v4s32_offset64
433 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
435 ; CHECK-LABEL: name: test_extract_p0_v4s32_offset64
436 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
437 ; CHECK: [[EXTRACT:%[0-9]+]]:_(p0) = G_EXTRACT [[COPY]](<4 x s32>), 64
438 ; CHECK: $vgpr0_vgpr1 = COPY [[EXTRACT]](p0)
439 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
440 %1:_(p0) = G_EXTRACT %0, 64
441 $vgpr0_vgpr1 = COPY %1
445 name: extract_s8_v4s8_offset0
448 ; CHECK-LABEL: name: extract_s8_v4s8_offset0
449 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
450 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
451 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 0
452 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
453 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
454 %0:_(<4 x s8>) = G_IMPLICIT_DEF
455 %1:_(s8) = G_EXTRACT %0, 0
456 %2:_(s32) = G_ANYEXT %1
461 name: extract_s8_v4s8_offset8
464 ; CHECK-LABEL: name: extract_s8_v4s8_offset8
465 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
466 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
467 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 16
468 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
469 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
470 %0:_(<4 x s8>) = G_IMPLICIT_DEF
471 %1:_(s8) = G_EXTRACT %0, 8
472 %2:_(s32) = G_ANYEXT %1
477 name: extract_s8_v4s8_offset16
480 ; CHECK-LABEL: name: extract_s8_v4s8_offset16
481 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
482 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
483 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 32
484 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
485 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
486 %0:_(<4 x s8>) = G_IMPLICIT_DEF
487 %1:_(s8) = G_EXTRACT %0, 16
488 %2:_(s32) = G_ANYEXT %1
493 name: extract_s8_v4s8_offset24
496 ; CHECK-LABEL: name: extract_s8_v4s8_offset24
497 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
498 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s16>) = G_TRUNC [[DEF]](<4 x s32>)
499 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[TRUNC]](<4 x s16>), 48
500 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
501 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
502 %0:_(<4 x s8>) = G_IMPLICIT_DEF
503 %1:_(s8) = G_EXTRACT %0, 24
504 %2:_(s32) = G_ANYEXT %1
509 name: extract_s8_v3s8_offset16
512 ; CHECK-LABEL: name: extract_s8_v3s8_offset16
513 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
514 ; CHECK: [[TRUNC:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[DEF]](<4 x s32>)
515 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s8>) = G_EXTRACT [[TRUNC]](<4 x s8>), 0
516 ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[EXTRACT]](<3 x s8>)
517 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
518 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s8)
519 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
520 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32)
521 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<3 x s16>) = G_TRUNC [[BUILD_VECTOR]](<3 x s32>)
522 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
523 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[TRUNC1]](<3 x s16>), 0
524 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<4 x s16>), 32
525 ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
526 ; CHECK: $vgpr0 = COPY [[ANYEXT3]](s32)
527 %0:_(<3 x s8>) = G_IMPLICIT_DEF
528 %1:_(s8) = G_EXTRACT %0, 16
529 %2:_(s32) = G_ANYEXT %1
534 name: extract_s8_v5s1_offset4
537 ; CHECK-LABEL: name: extract_s8_v5s1_offset4
538 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
539 ; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s1>) = G_TRUNC [[DEF]](<6 x s32>)
540 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<5 x s1>) = G_EXTRACT [[TRUNC]](<6 x s1>), 0
541 ; CHECK: [[UV:%[0-9]+]]:_(s1), [[UV1:%[0-9]+]]:_(s1), [[UV2:%[0-9]+]]:_(s1), [[UV3:%[0-9]+]]:_(s1), [[UV4:%[0-9]+]]:_(s1) = G_UNMERGE_VALUES [[EXTRACT]](<5 x s1>)
542 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s1)
543 ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s1)
544 ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s1)
545 ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s1)
546 ; CHECK: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[UV4]](s1)
547 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<5 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32), [[ANYEXT3]](s32), [[ANYEXT4]](s32)
548 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<5 x s16>) = G_TRUNC [[BUILD_VECTOR]](<5 x s32>)
549 ; CHECK: [[DEF1:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
550 ; CHECK: [[TRUNC2:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF1]](<6 x s32>)
551 ; CHECK: [[INSERT:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[TRUNC2]], [[TRUNC1]](<5 x s16>), 0
552 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<6 x s16>), 64
553 ; CHECK: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
554 ; CHECK: $vgpr0 = COPY [[ANYEXT5]](s32)
555 %0:_(<5 x s1>) = G_IMPLICIT_DEF
556 %1:_(s1) = G_EXTRACT %0, 4
557 %2:_(s32) = G_ANYEXT %1
562 name: extract_v2s16_v4s16_offset32
565 ; CHECK-LABEL: name: extract_v2s16_v4s16_offset32
566 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
567 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 32
568 ; CHECK: $vgpr0 = COPY [[EXTRACT]](<2 x s16>)
569 %0:_(<4 x s16>) = G_IMPLICIT_DEF
570 %1:_(<2 x s16>) = G_EXTRACT %0, 32
575 name: extract_v2s16_v6s16_offset32
578 ; CHECK-LABEL: name: extract_v2s16_v6s16_offset32
579 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
580 ; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF]](<6 x s32>)
581 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[TRUNC]](<6 x s16>), 32
582 ; CHECK: $vgpr0 = COPY [[EXTRACT]](<2 x s16>)
583 %0:_(<6 x s16>) = G_IMPLICIT_DEF
584 %1:_(<2 x s16>) = G_EXTRACT %0, 32
589 name: test_extract_s8_s16_offset0
593 ; CHECK-LABEL: name: test_extract_s8_s16_offset0
594 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
595 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
596 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
597 %0:_(s32) = COPY $vgpr0
598 %1:_(s16) = G_TRUNC %0
599 %2:_(s8) = G_EXTRACT %1, 0
600 %3:_(s32) = G_ANYEXT %2
605 name: test_extract_s8_s16_offset1
609 ; CHECK-LABEL: name: test_extract_s8_s16_offset1
610 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
611 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
612 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
613 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[C]](s32)
614 ; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[TRUNC1]](s16)
615 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
616 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
617 %0:_(s32) = COPY $vgpr0
618 %1:_(s16) = G_TRUNC %0
619 %2:_(s8) = G_EXTRACT %1, 1
620 %3:_(s32) = G_ANYEXT %2
625 name: test_extract_s8_s16_offset8
629 ; CHECK-LABEL: name: test_extract_s8_s16_offset8
630 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
631 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
632 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
633 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[C]](s32)
634 ; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[TRUNC1]](s16)
635 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
636 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
637 %0:_(s32) = COPY $vgpr0
638 %1:_(s16) = G_TRUNC %0
639 %2:_(s8) = G_EXTRACT %1, 8
640 %3:_(s32) = G_ANYEXT %2
645 name: test_extract_s8_s32_offset0
649 ; CHECK-LABEL: name: test_extract_s8_s32_offset0
650 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
651 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
652 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
653 %0:_(s32) = COPY $vgpr0
654 %1:_(s8) = G_EXTRACT %0, 0
655 %2:_(s32) = G_ANYEXT %1
660 name: test_extract_s8_s32_offset1
664 ; CHECK-LABEL: name: test_extract_s8_s32_offset1
665 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
666 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
667 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
668 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
669 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
670 %0:_(s32) = COPY $vgpr0
671 %1:_(s8) = G_EXTRACT %0, 1
672 %2:_(s32) = G_ANYEXT %1
677 name: test_extract_s8_s32_offset8
681 ; CHECK-LABEL: name: test_extract_s8_s32_offset8
682 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
683 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
684 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
685 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
686 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
687 %0:_(s32) = COPY $vgpr0
688 %1:_(s8) = G_EXTRACT %0, 8
689 %2:_(s32) = G_ANYEXT %1
694 name: test_extract_s8_s32_offset16
698 ; CHECK-LABEL: name: test_extract_s8_s32_offset16
699 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
700 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
701 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
702 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
703 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
704 %0:_(s32) = COPY $vgpr0
705 %1:_(s8) = G_EXTRACT %0, 16
706 %2:_(s32) = G_ANYEXT %1
711 name: test_extract_s8_s32_offset24
715 ; CHECK-LABEL: name: test_extract_s8_s32_offset24
716 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
717 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
718 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
719 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
720 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
721 %0:_(s32) = COPY $vgpr0
722 %1:_(s8) = G_EXTRACT %0, 16
723 %2:_(s32) = G_ANYEXT %1
728 name: test_extract_s8_p3_offset0
732 ; CHECK-LABEL: name: test_extract_s8_p3_offset0
733 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
734 ; CHECK: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
735 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[PTRTOINT]](s32)
736 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
737 %0:_(p3) = COPY $vgpr0
738 %1:_(s8) = G_EXTRACT %0, 0
739 %2:_(s32) = G_ANYEXT %1
744 name: test_extract_s8_p3_offset8
748 ; CHECK-LABEL: name: test_extract_s8_p3_offset8
749 ; CHECK: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
750 ; CHECK: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
751 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
752 ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
753 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
754 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
755 %0:_(p3) = COPY $vgpr0
756 %1:_(s8) = G_EXTRACT %0, 8
757 %2:_(s32) = G_ANYEXT %1
762 name: test_extract_s1_s8_offset0
766 ; CHECK-LABEL: name: test_extract_s1_s8_offset0
767 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
768 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
769 ; CHECK: $vgpr0 = COPY [[COPY1]](s32)
770 %0:_(s32) = COPY $vgpr0
771 %1:_(s8) = G_TRUNC %0
772 %2:_(s1) = G_EXTRACT %1, 0
773 %3:_(s32) = G_ANYEXT %2
778 name: test_extract_s1_s8_offset2
782 ; CHECK-LABEL: name: test_extract_s1_s8_offset2
783 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
784 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
785 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
786 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[C]](s32)
787 ; CHECK: [[LSHR:%[0-9]+]]:_(s16) = G_LSHR [[TRUNC]], [[TRUNC1]](s16)
788 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[LSHR]](s16)
789 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
790 %0:_(s32) = COPY $vgpr0
791 %1:_(s8) = G_TRUNC %0
792 %2:_(s1) = G_EXTRACT %1, 2
793 %3:_(s32) = G_ANYEXT %2
798 name: test_extract_s8_s64_offset2
801 liveins: $vgpr0_vgpr1
802 ; CHECK-LABEL: name: test_extract_s8_s64_offset2
803 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
804 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
805 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
806 ; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY]], [[TRUNC]](s32)
807 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[LSHR]](s64)
808 ; CHECK: $vgpr0 = COPY [[TRUNC1]](s32)
809 %0:_(s64) = COPY $vgpr0_vgpr1
810 %1:_(s8) = G_EXTRACT %0, 2
811 %2:_(s32) = G_ANYEXT %1
816 name: extract_s16_v3s16_offset0
820 ; CHECK-LABEL: name: extract_s16_v3s16_offset0
821 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
822 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
823 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
824 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT]](<3 x s16>), 0
825 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT]](<4 x s16>), 0
826 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT1]](s16)
827 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
828 %0:_(<3 x s16>) = G_IMPLICIT_DEF
829 %1:_(s16) = G_EXTRACT %0, 0
830 %2:_(s32) = G_ANYEXT %1
835 name: test_extract_s8_s64_offset16
838 liveins: $vgpr0_vgpr1
839 ; CHECK-LABEL: name: test_extract_s8_s64_offset16
840 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
841 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
842 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[C]](s64)
843 ; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY]], [[TRUNC]](s32)
844 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[LSHR]](s64)
845 ; CHECK: $vgpr0 = COPY [[TRUNC1]](s32)
846 %0:_(s64) = COPY $vgpr0_vgpr1
847 %1:_(s8) = G_EXTRACT %0, 16
848 %2:_(s32) = G_ANYEXT %1
853 name: test_extract_s16_s64_offset16
856 liveins: $vgpr0_vgpr1
857 ; CHECK-LABEL: name: test_extract_s16_s64_offset16
858 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
859 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 16
860 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
861 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
862 %0:_(s64) = COPY $vgpr0_vgpr1
863 %1:_(s16) = G_EXTRACT %0, 16
864 %2:_(s32) = G_ANYEXT %1
869 name: test_extract_s16_s64_offset32
872 liveins: $vgpr0_vgpr1
873 ; CHECK-LABEL: name: test_extract_s16_s64_offset32
874 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
875 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 32
876 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
877 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
878 %0:_(s64) = COPY $vgpr0_vgpr1
879 %1:_(s16) = G_EXTRACT %0, 32
880 %2:_(s32) = G_ANYEXT %1
885 name: test_extract_s16_s64_offset48
888 liveins: $vgpr0_vgpr1
889 ; CHECK-LABEL: name: test_extract_s16_s64_offset48
890 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
891 ; CHECK: [[EXTRACT:%[0-9]+]]:_(s16) = G_EXTRACT [[COPY]](s64), 48
892 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[EXTRACT]](s16)
893 ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
894 %0:_(s64) = COPY $vgpr0_vgpr1
895 %1:_(s16) = G_EXTRACT %0, 48
896 %2:_(s32) = G_ANYEXT %1
901 name: extract_v2s16_v3s16_offset0
905 ; CHECK-LABEL: name: extract_v2s16_v3s16_offset0
906 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
907 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
908 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
909 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT]](<3 x s16>), 0
910 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<4 x s16>), 0
911 ; CHECK: $vgpr0 = COPY [[EXTRACT1]](<2 x s16>)
912 %0:_(<3 x s16>) = G_IMPLICIT_DEF
913 %1:_(<2 x s16>) = G_EXTRACT %0, 0
918 name: extract_v2s16_v5s16_offset0
922 ; CHECK-LABEL: name: extract_v2s16_v5s16_offset0
923 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
924 ; CHECK: [[TRUNC:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF]](<6 x s32>)
925 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<5 x s16>) = G_EXTRACT [[TRUNC]](<6 x s16>), 0
926 ; CHECK: [[DEF1:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
927 ; CHECK: [[TRUNC1:%[0-9]+]]:_(<6 x s16>) = G_TRUNC [[DEF1]](<6 x s32>)
928 ; CHECK: [[INSERT:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[TRUNC1]], [[EXTRACT]](<5 x s16>), 0
929 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<6 x s16>), 0
930 ; CHECK: $vgpr0 = COPY [[EXTRACT1]](<2 x s16>)
931 %0:_(<5 x s16>) = G_IMPLICIT_DEF
932 %1:_(<2 x s16>) = G_EXTRACT %0, 0