1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
3 # RUN: llc -O0 -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
6 name: test_implicit_def_s1
10 ; CHECK-LABEL: name: test_implicit_def_s1
11 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
12 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](s32)
13 %0:_(s1) = G_IMPLICIT_DEF
14 %1:_(s32) = G_ANYEXT %0
19 name: test_implicit_def_s7
23 ; CHECK-LABEL: name: test_implicit_def_s7
24 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
25 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](s32)
26 %0:_(s7) = G_IMPLICIT_DEF
27 %1:_(s32) = G_ANYEXT %0
32 name: test_implicit_def_s8
36 ; CHECK-LABEL: name: test_implicit_def_s8
37 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
38 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](s32)
39 %0:_(s8) = G_IMPLICIT_DEF
40 %1:_(s32) = G_ANYEXT %0
45 name: test_implicit_def_s16
49 ; CHECK-LABEL: name: test_implicit_def_s16
50 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
51 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](s32)
52 %0:_(s16) = G_IMPLICIT_DEF
53 %1:_(s32) = G_ANYEXT %0
58 name: test_implicit_def_s32
62 ; CHECK-LABEL: name: test_implicit_def_s32
63 ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
64 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](s32)
65 %0:_(s32) = G_IMPLICIT_DEF
70 name: test_implicit_def_48
74 ; CHECK-LABEL: name: test_implicit_def_48
75 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
76 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](s64)
77 %0:_(s48) = G_IMPLICIT_DEF
78 %1:_(s64) = G_ANYEXT %0
79 $vgpr0_vgpr1 = COPY %1
83 name: test_implicit_def_s64
87 ; CHECK-LABEL: name: test_implicit_def_s64
88 ; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
89 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](s64)
90 %0:_(s64) = G_IMPLICIT_DEF
91 $vgpr0_vgpr1 = COPY %0
95 name: test_implicit_def_s65
99 ; CHECK-LABEL: name: test_implicit_def_s65
100 ; CHECK: [[DEF:%[0-9]+]]:_(s128) = G_IMPLICIT_DEF
101 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s96) = G_TRUNC [[DEF]](s128)
102 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[TRUNC]](s96)
103 %0:_(s65) = G_IMPLICIT_DEF
104 %1:_(s96) = G_ANYEXT %0
105 $vgpr0_vgpr1_vgpr2 = COPY %1
109 name: test_implicit_def_s128
113 ; CHECK-LABEL: name: test_implicit_def_s128
114 ; CHECK: [[DEF:%[0-9]+]]:_(s128) = G_IMPLICIT_DEF
115 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DEF]](s128)
116 %0:_(s128) = G_IMPLICIT_DEF
117 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0
121 name: test_implicit_def_256
125 ; CHECK-LABEL: name: test_implicit_def_256
126 ; CHECK: [[DEF:%[0-9]+]]:_(s256) = G_IMPLICIT_DEF
127 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[DEF]](s256)
128 %0:_(s256) = G_IMPLICIT_DEF
129 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %0
133 name: test_implicit_def_s448
137 ; CHECK-LABEL: name: test_implicit_def_s448
138 ; CHECK: [[DEF:%[0-9]+]]:_(s448) = G_IMPLICIT_DEF
139 ; CHECK-NEXT: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[DEF]](s448), 0
140 ; CHECK-NEXT: $vgpr0 = COPY [[EXTRACT]](s32)
141 %0:_(s448) = G_IMPLICIT_DEF
142 %1:_(s32) = G_EXTRACT %0, 0
147 name: test_implicit_def_s512
151 ; CHECK-LABEL: name: test_implicit_def_s512
152 ; CHECK: [[DEF:%[0-9]+]]:_(s512) = G_IMPLICIT_DEF
153 ; CHECK-NEXT: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[DEF]](s512), 0
154 ; CHECK-NEXT: $vgpr0 = COPY [[EXTRACT]](s32)
155 %0:_(s512) = G_IMPLICIT_DEF
156 %1:_(s32) = G_EXTRACT %0, 0
161 name: test_implicit_def_s1024
165 ; CHECK-LABEL: name: test_implicit_def_s1024
166 ; CHECK: [[DEF:%[0-9]+]]:_(s1024) = G_IMPLICIT_DEF
167 ; CHECK-NEXT: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[DEF]](s1024), 0
168 ; CHECK-NEXT: $vgpr0 = COPY [[EXTRACT]](s32)
169 %0:_(s1024) = G_IMPLICIT_DEF
170 %1:_(s32) = G_EXTRACT %0, 0
175 name: test_implicit_def_s1056
179 ; CHECK-LABEL: name: test_implicit_def_s1056
180 ; CHECK: [[DEF:%[0-9]+]]:_(s1024) = G_IMPLICIT_DEF
181 ; 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]](s1024)
182 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
183 %0:_(s1056) = G_IMPLICIT_DEF
184 %1:_(s32) = G_TRUNC %0
189 name: test_implicit_def_s2048
193 ; CHECK-LABEL: name: test_implicit_def_s2048
194 ; CHECK: [[DEF:%[0-9]+]]:_(s1024) = G_IMPLICIT_DEF
195 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[DEF]](s1024)
196 ; CHECK-NEXT: $vgpr0 = COPY [[TRUNC]](s32)
197 %0:_(s2048) = G_IMPLICIT_DEF
198 %1:_(s32) = G_TRUNC %0
203 name: test_implicit_def_v2s32
207 ; CHECK-LABEL: name: test_implicit_def_v2s32
208 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
209 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](<2 x s32>)
210 %0:_(<2 x s32>) = G_IMPLICIT_DEF
211 $vgpr0_vgpr1 = COPY %0
215 name: test_implicit_def_v3s32
219 ; CHECK-LABEL: name: test_implicit_def_v3s32
220 ; CHECK: [[DEF:%[0-9]+]]:_(<3 x s32>) = G_IMPLICIT_DEF
221 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[DEF]](<3 x s32>)
222 %0:_(<3 x s32>) = G_IMPLICIT_DEF
223 $vgpr0_vgpr1_vgpr2 = COPY %0
227 name: test_implicit_def_v4s32
231 ; CHECK-LABEL: name: test_implicit_def_v4s32
232 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
233 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DEF]](<4 x s32>)
234 %0:_(<4 x s32>) = G_IMPLICIT_DEF
235 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0
239 name: test_implicit_def_v5s32
243 ; CHECK-LABEL: name: test_implicit_def_v5s32
244 ; CHECK: [[DEF:%[0-9]+]]:_(<5 x s32>) = G_IMPLICIT_DEF
245 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]](<5 x s32>)
246 %0:_(<5 x s32>) = G_IMPLICIT_DEF
251 name: test_implicit_def_v6s32
255 ; CHECK-LABEL: name: test_implicit_def_v6s32
256 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s32>) = G_IMPLICIT_DEF
257 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]](<6 x s32>)
258 %0:_(<6 x s32>) = G_IMPLICIT_DEF
263 name: test_implicit_def_v7s32
267 ; CHECK-LABEL: name: test_implicit_def_v7s32
268 ; CHECK: [[DEF:%[0-9]+]]:_(<7 x s32>) = G_IMPLICIT_DEF
269 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]](<7 x s32>)
270 %0:_(<7 x s32>) = G_IMPLICIT_DEF
275 name: test_implicit_def_v8s32
279 ; CHECK-LABEL: name: test_implicit_def_v8s32
280 ; CHECK: [[DEF:%[0-9]+]]:_(<8 x s32>) = G_IMPLICIT_DEF
281 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[DEF]](<8 x s32>)
282 %0:_(<8 x s32>) = G_IMPLICIT_DEF
283 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %0
287 name: test_implicit_def_v16s32
291 ; CHECK-LABEL: name: test_implicit_def_v16s32
292 ; CHECK: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
293 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[DEF]](<16 x s32>)
294 %0:_(<16 x s32>) = G_IMPLICIT_DEF
295 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %0
299 name: test_implicit_def_v17s32
303 ; CHECK-LABEL: name: test_implicit_def_v17s32
304 ; CHECK: [[DEF:%[0-9]+]]:_(<17 x s32>) = G_IMPLICIT_DEF
305 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]](<17 x s32>)
306 %0:_(<17 x s32>) = G_IMPLICIT_DEF
311 name: test_implicit_def_v32s32
315 ; CHECK-LABEL: name: test_implicit_def_v32s32
316 ; CHECK: [[DEF:%[0-9]+]]:_(<32 x s32>) = G_IMPLICIT_DEF
317 ; CHECK-NEXT: S_NOP 0, implicit [[DEF]](<32 x s32>)
318 %0:_(<32 x s32>) = G_IMPLICIT_DEF
323 name: test_implicit_def_v33s32
326 liveins: $vgpr0_vgpr1
328 ; CHECK-LABEL: name: test_implicit_def_v33s32
329 ; CHECK: liveins: $vgpr0_vgpr1
331 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
332 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
333 ; 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>)
334 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
335 ; CHECK-NEXT: G_STORE [[UV]](s32), [[COPY]](p1) :: (volatile store (s32), addrspace 1)
336 ; CHECK-NEXT: G_STORE [[DEF1]](s32), [[COPY]](p1) :: (volatile store (s32), addrspace 1)
337 %0:_(<33 x s32>) = G_IMPLICIT_DEF
338 %1:_(s32), %2:_(s32), %3:_(s32), %4:_(s32), %5:_(s32), %6:_(s32), %7:_(s32), %8:_(s32), %9:_(s32), %10:_(s32), %11:_(s32), %12:_(s32), %13:_(s32), %14:_(s32), %15:_(s32), %16:_(s32), %17:_(s32), %18:_(s32), %19:_(s32), %20:_(s32), %21:_(s32), %22:_(s32), %23:_(s32), %24:_(s32), %25:_(s32), %26:_(s32), %27:_(s32), %28:_(s32), %29:_(s32), %30:_(s32), %31:_(s32), %32:_(s32), %33:_(s32) = G_UNMERGE_VALUES %0
339 %34:_(p1) = COPY $vgpr0_vgpr1
340 G_STORE %1, %34 :: (volatile store (s32), align 4, addrspace 1)
341 G_STORE %33, %34 :: (volatile store (s32), align 4, addrspace 1)
346 name: test_implicit_def_v64s32
350 ; CHECK-LABEL: name: test_implicit_def_v64s32
351 ; CHECK: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
352 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<64 x s32>) = G_CONCAT_VECTORS [[DEF]](<16 x s32>), [[DEF]](<16 x s32>), [[DEF]](<16 x s32>), [[DEF]](<16 x s32>)
353 ; CHECK-NEXT: [[CONCAT_VECTORS1:%[0-9]+]]:_(<32 x s32>) = G_CONCAT_VECTORS [[DEF]](<16 x s32>), [[DEF]](<16 x s32>)
354 ; CHECK-NEXT: S_NOP 0, implicit [[CONCAT_VECTORS]](<64 x s32>), implicit [[CONCAT_VECTORS1]](<32 x s32>)
355 %0:_(<64 x s32>) = G_IMPLICIT_DEF
356 %1:_(<32 x s32>), %2:_(<32 x s32>) = G_UNMERGE_VALUES %0
357 S_NOP 0, implicit %0, implicit %1
361 name: test_implicit_def_v2s1
365 ; CHECK-LABEL: name: test_implicit_def_v2s1
366 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
367 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](<2 x s32>)
368 %0:_(<2 x s1>) = G_IMPLICIT_DEF
369 %1:_(<2 x s32>) = G_ANYEXT %0
370 $vgpr0_vgpr1 = COPY %1
374 name: test_implicit_def_v3s1
378 ; CHECK-LABEL: name: test_implicit_def_v3s1
379 ; CHECK: [[DEF:%[0-9]+]]:_(<3 x s32>) = G_IMPLICIT_DEF
380 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[DEF]](<3 x s32>)
381 %0:_(<3 x s1>) = G_IMPLICIT_DEF
382 %1:_(<3 x s32>) = G_ANYEXT %0
383 $vgpr0_vgpr1_vgpr2 = COPY %1
387 name: test_implicit_def_v2s8
391 ; CHECK-LABEL: name: test_implicit_def_v2s8
392 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
393 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](<2 x s32>)
394 %0:_(<2 x s8>) = G_IMPLICIT_DEF
395 %1:_(<2 x s32>) = G_ANYEXT %0
396 $vgpr0_vgpr1 = COPY %1
400 name: test_implicit_def_v3s8
404 ; CHECK-LABEL: name: test_implicit_def_v3s8
405 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
406 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<4 x s32>)
407 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[UV2]](s32)
408 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
409 %0:_(<3 x s8>) = G_IMPLICIT_DEF
410 %1:_(<3 x s32>) = G_ANYEXT %0
411 $vgpr0_vgpr1_vgpr2 = COPY %1
415 name: test_implicit_def_v2s16
419 ; CHECK-LABEL: name: test_implicit_def_v2s16
420 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s16>) = G_IMPLICIT_DEF
421 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](<2 x s16>)
422 %0:_(<2 x s16>) = G_IMPLICIT_DEF
427 name: test_implicit_def_v3s16
431 ; CHECK-LABEL: name: test_implicit_def_v3s16
432 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
433 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
434 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
435 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
436 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
437 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
438 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
439 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF1]](<4 x s16>)
440 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
441 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
442 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
443 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
444 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
445 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
446 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
447 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
448 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
449 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
450 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
451 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
452 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
453 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
454 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
455 %0:_(<3 x s16>) = G_IMPLICIT_DEF
456 %1:_(<4 x s16>) = G_IMPLICIT_DEF
457 %2:_(<4 x s16>) = G_INSERT %1, %0, 0
458 $vgpr0_vgpr1 = COPY %2
462 name: test_implicit_def_v4s16
466 ; CHECK-LABEL: name: test_implicit_def_v4s16
467 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
468 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](<4 x s16>)
469 %0:_(<4 x s16>) = G_IMPLICIT_DEF
470 $vgpr0_vgpr1 = COPY %0
474 name: test_implicit_def_v5s16
478 ; CHECK-LABEL: name: test_implicit_def_v5s16
479 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s16>) = G_IMPLICIT_DEF
480 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>), [[UV2:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<6 x s16>)
481 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
482 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
483 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
484 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
485 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
486 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV2]](<2 x s16>)
487 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
488 ; CHECK-NEXT: [[UV3:%[0-9]+]]:_(<2 x s16>), [[UV4:%[0-9]+]]:_(<2 x s16>), [[UV5:%[0-9]+]]:_(<2 x s16>), [[UV6:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF1]](<8 x s16>)
489 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[UV5]](<2 x s16>)
490 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C]](s32)
491 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
492 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
493 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
494 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
495 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
496 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
497 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
498 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
499 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
500 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
501 ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
502 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C1]]
503 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s32) = G_AND [[LSHR2]], [[C1]]
504 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C]](s32)
505 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND4]], [[SHL2]]
506 ; CHECK-NEXT: [[BITCAST6:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
507 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[BITCAST4]](<2 x s16>), [[BITCAST5]](<2 x s16>), [[BITCAST6]](<2 x s16>), [[UV6]](<2 x s16>)
508 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<8 x s16>)
509 %0:_(<5 x s16>) = G_IMPLICIT_DEF
510 %1:_(<8 x s16>) = G_IMPLICIT_DEF
511 %2:_(<8 x s16>) = G_INSERT %1, %0, 0
512 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
516 name: test_implicit_def_v6s16
520 ; CHECK-LABEL: name: test_implicit_def_v6s16
521 ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s16>) = G_IMPLICIT_DEF
522 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
523 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>), [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF1]](<8 x s16>)
524 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(<2 x s16>), [[UV5:%[0-9]+]]:_(<2 x s16>), [[UV6:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<6 x s16>)
525 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<8 x s16>) = G_CONCAT_VECTORS [[UV4]](<2 x s16>), [[UV5]](<2 x s16>), [[UV6]](<2 x s16>), [[UV3]](<2 x s16>)
526 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<8 x s16>)
527 %0:_(<6 x s16>) = G_IMPLICIT_DEF
528 %1:_(<8 x s16>) = G_IMPLICIT_DEF
529 %2:_(<8 x s16>) = G_INSERT %1, %0, 0
530 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
534 name: test_implicit_def_v8s16
538 ; CHECK-LABEL: name: test_implicit_def_v8s16
539 ; CHECK: [[DEF:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
540 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DEF]](<8 x s16>)
541 %0:_(<8 x s16>) = G_IMPLICIT_DEF
542 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0
546 name: test_implicit_def_v2s64
550 ; CHECK-LABEL: name: test_implicit_def_v2s64
551 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
552 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[DEF]](<2 x s64>)
553 %0:_(<2 x s64>) = G_IMPLICIT_DEF
554 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0
558 name: test_implicit_def_v4s8
562 ; CHECK-LABEL: name: test_implicit_def_v4s8
563 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
564 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(<4 x s8>) = G_TRUNC [[DEF]](<4 x s32>)
565 ; CHECK-NEXT: $vgpr0 = COPY [[TRUNC]](<4 x s8>)
566 %0:_(<4 x s8>) = G_IMPLICIT_DEF
571 name: test_implicit_def_p0
575 ; CHECK-LABEL: name: test_implicit_def_p0
576 ; CHECK: [[DEF:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF
577 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](p0)
578 %0:_(p0) = G_IMPLICIT_DEF
579 $vgpr0_vgpr1 = COPY %0
583 name: test_implicit_def_p1
587 ; CHECK-LABEL: name: test_implicit_def_p1
588 ; CHECK: [[DEF:%[0-9]+]]:_(p1) = G_IMPLICIT_DEF
589 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](p1)
590 %0:_(p1) = G_IMPLICIT_DEF
591 $vgpr0_vgpr1 = COPY %0
595 name: test_implicit_def_p2
599 ; CHECK-LABEL: name: test_implicit_def_p2
600 ; CHECK: [[DEF:%[0-9]+]]:_(p2) = G_IMPLICIT_DEF
601 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](p2)
602 %0:_(p2) = G_IMPLICIT_DEF
607 name: test_implicit_def_p3
611 ; CHECK-LABEL: name: test_implicit_def_p3
612 ; CHECK: [[DEF:%[0-9]+]]:_(p3) = G_IMPLICIT_DEF
613 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](p3)
614 %0:_(p3) = G_IMPLICIT_DEF
619 name: test_implicit_def_p4
623 ; CHECK-LABEL: name: test_implicit_def_p4
624 ; CHECK: [[DEF:%[0-9]+]]:_(p4) = G_IMPLICIT_DEF
625 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](p4)
626 %0:_(p4) = G_IMPLICIT_DEF
627 $vgpr0_vgpr1 = COPY %0
631 name: test_implicit_def_p5
635 ; CHECK-LABEL: name: test_implicit_def_p5
636 ; CHECK: [[DEF:%[0-9]+]]:_(p5) = G_IMPLICIT_DEF
637 ; CHECK-NEXT: $vgpr0 = COPY [[DEF]](p5)
638 %0:_(p5) = G_IMPLICIT_DEF
643 name: test_implicit_def_p999
647 ; CHECK-LABEL: name: test_implicit_def_p999
648 ; CHECK: [[DEF:%[0-9]+]]:_(p999) = G_IMPLICIT_DEF
649 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[DEF]](p999)
650 %0:_(p999) = G_IMPLICIT_DEF
651 $vgpr0_vgpr1 = COPY %0
656 name: test_implicit_def_v2s1024
660 ; CHECK-LABEL: name: test_implicit_def_v2s1024
661 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s1024>) = G_IMPLICIT_DEF
662 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s1024), [[UV1:%[0-9]+]]:_(s1024) = G_UNMERGE_VALUES [[DEF]](<2 x s1024>)
663 ; CHECK-NEXT: S_ENDPGM 0, implicit [[UV]](s1024), implicit [[UV1]](s1024)
664 %0:_(<2 x s1024>) = G_IMPLICIT_DEF
665 %1:_(s1024), %2:_(s1024) = G_UNMERGE_VALUES %0
666 S_ENDPGM 0, implicit %1, implicit %2
671 name: test_implicit_def_v3s1024
675 ; CHECK-LABEL: name: test_implicit_def_v3s1024
676 ; CHECK: [[DEF:%[0-9]+]]:_(<3 x s1024>) = G_IMPLICIT_DEF
677 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s1024), [[UV1:%[0-9]+]]:_(s1024), [[UV2:%[0-9]+]]:_(s1024) = G_UNMERGE_VALUES [[DEF]](<3 x s1024>)
678 ; CHECK-NEXT: S_ENDPGM 0, implicit [[UV]](s1024), implicit [[UV1]](s1024), implicit [[UV2]](s1024)
679 %0:_(<3 x s1024>) = G_IMPLICIT_DEF
680 %1:_(s1024), %2:_(s1024), %3:_(s1024) = G_UNMERGE_VALUES %0
681 S_ENDPGM 0, implicit %1, implicit %2, implicit %3