1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-- -O0 -run-pass=legalizer -global-isel-abort=0 -o - %s | FileCheck %s
5 name: test_unmerge_s32_s64
8 ; CHECK-LABEL: name: test_unmerge_s32_s64
9 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
10 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[C]](s64)
11 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
12 ; CHECK-NEXT: $vgpr1 = COPY [[UV1]](s32)
13 %0:_(s64) = G_CONSTANT i64 0
14 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0:_(s64)
20 name: test_unmerge_s32_v2s32
24 ; CHECK-LABEL: name: test_unmerge_s32_v2s32
25 ; CHECK: liveins: $vgpr0_vgpr1
27 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
28 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
29 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
30 ; CHECK-NEXT: $vgpr1 = COPY [[UV1]](s32)
31 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
32 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0
38 name: test_unmerge_s32_v7s64
42 ; CHECK-LABEL: name: test_unmerge_s32_v7s64
43 ; CHECK: [[DEF:%[0-9]+]]:_(<7 x s64>) = IMPLICIT_DEF
44 ; 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) = G_UNMERGE_VALUES [[DEF]](<7 x s64>)
45 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
46 ; CHECK-NEXT: $vgpr1 = COPY [[UV1]](s32)
47 ; CHECK-NEXT: $vgpr2 = COPY [[UV2]](s32)
48 ; CHECK-NEXT: $vgpr3 = COPY [[UV3]](s32)
49 ; CHECK-NEXT: $vgpr4 = COPY [[UV4]](s32)
50 ; CHECK-NEXT: $vgpr5 = COPY [[UV5]](s32)
51 ; CHECK-NEXT: $vgpr6 = COPY [[UV6]](s32)
52 ; CHECK-NEXT: $vgpr7 = COPY [[UV7]](s32)
53 ; CHECK-NEXT: $vgpr8 = COPY [[UV8]](s32)
54 ; CHECK-NEXT: $vgpr9 = COPY [[UV9]](s32)
55 ; CHECK-NEXT: $vgpr10 = COPY [[UV10]](s32)
56 ; CHECK-NEXT: $vgpr11 = COPY [[UV11]](s32)
57 ; CHECK-NEXT: $vgpr12 = COPY [[UV12]](s32)
58 ; CHECK-NEXT: $vgpr13 = COPY [[UV13]](s32)
59 %0:_(<7 x s64>) = IMPLICIT_DEF
60 %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) = G_UNMERGE_VALUES %0
78 name: test_unmerge_s16_v2s16
82 ; CHECK-LABEL: name: test_unmerge_s16_v2s16
83 ; CHECK: liveins: $vgpr0
85 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
86 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
87 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
88 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
89 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST]](s32)
90 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
91 %0:_(<2 x s16>) = COPY $vgpr0
92 %1:_(s16), %2:_(s16) = G_UNMERGE_VALUES %0
93 %3:_(s32) = G_ANYEXT %1
94 %4:_(s32) = G_ANYEXT %2
100 name: test_unmerge_s16_v3s16
103 ; CHECK-LABEL: name: test_unmerge_s16_v3s16
104 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
105 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
106 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
107 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
108 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
109 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
110 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST]](s32)
111 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
112 ; CHECK-NEXT: $vgpr2 = COPY [[BITCAST1]](s32)
113 %0:_(<3 x s16>) = G_IMPLICIT_DEF
114 %1:_(s16), %2:_(s16), %3:_(s16) = G_UNMERGE_VALUES %0
115 %4:_(s32) = G_ANYEXT %1
116 %5:_(s32) = G_ANYEXT %2
117 %6:_(s32) = G_ANYEXT %3
125 name: test_unmerge_s16_v4s16
128 liveins: $vgpr0_vgpr1
129 ; CHECK-LABEL: name: test_unmerge_s16_v4s16
130 ; CHECK: liveins: $vgpr0_vgpr1
132 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
133 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
134 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
135 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
136 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
137 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
138 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
139 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST]](s32)
140 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
141 ; CHECK-NEXT: $vgpr2 = COPY [[BITCAST1]](s32)
142 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR1]](s32)
143 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
144 %1:_(s16), %2:_(s16), %3:_(s16), %4:_(s16) = G_UNMERGE_VALUES %0
145 %5:_(s32) = G_ANYEXT %1
146 %6:_(s32) = G_ANYEXT %2
147 %7:_(s32) = G_ANYEXT %3
148 %8:_(s32) = G_ANYEXT %4
156 name: test_unmerge_s16_v6s16
159 liveins: $vgpr0_vgpr1
160 ; CHECK-LABEL: name: test_unmerge_s16_v6s16
161 ; CHECK: liveins: $vgpr0_vgpr1
163 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
164 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>), [[UV2:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
165 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
166 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
167 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
168 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
169 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
170 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV2]](<2 x s16>)
171 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
172 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST]](s32)
173 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
174 ; CHECK-NEXT: $vgpr2 = COPY [[BITCAST1]](s32)
175 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR1]](s32)
176 ; CHECK-NEXT: $vgpr4 = COPY [[BITCAST2]](s32)
177 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR2]](s32)
178 %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
179 %1:_(s16), %2:_(s16), %3:_(s16), %4:_(s16), %5:_(s16), %6:_(s16) = G_UNMERGE_VALUES %0
180 %7:_(s32) = G_ANYEXT %1
181 %8:_(s32) = G_ANYEXT %2
182 %9:_(s32) = G_ANYEXT %3
183 %10:_(s32) = G_ANYEXT %4
184 %11:_(s32) = G_ANYEXT %5
185 %12:_(s32) = G_ANYEXT %6
196 name: test_unmerge_s8_s16
200 ; CHECK-LABEL: name: test_unmerge_s8_s16
201 ; CHECK: liveins: $vgpr0
203 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
204 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
205 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
206 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
207 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
208 %0:_(s32) = COPY $vgpr0
209 %1:_(s16) = G_TRUNC %0
210 %2:_(s8), %3:_(s8) = G_UNMERGE_VALUES %1
211 %4:_(s32) = G_ANYEXT %2
212 %5:_(s32) = G_ANYEXT %3
218 name: test_unmerge_s8_s32
222 ; CHECK-LABEL: name: test_unmerge_s8_s32
223 ; CHECK: liveins: $vgpr0
225 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
226 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
227 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
228 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
229 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
230 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
231 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C2]](s32)
232 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
233 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
234 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
235 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR2]](s32)
236 %0:_(s32) = COPY $vgpr0
237 %1:_(s8), %2:_(s8), %3:_(s8), %4:_(s8) = G_UNMERGE_VALUES %0
238 %5:_(s32) = G_ANYEXT %1
239 %6:_(s32) = G_ANYEXT %2
240 %7:_(s32) = G_ANYEXT %3
241 %8:_(s32) = G_ANYEXT %4
249 name: test_unmerge_s8_s48
252 liveins: $vgpr0_vgpr1
253 ; CHECK-LABEL: name: test_unmerge_s8_s48
254 ; CHECK: liveins: $vgpr0_vgpr1
256 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
257 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
258 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
259 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
260 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
261 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
262 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
263 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
264 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY1]](s32)
265 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
266 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
267 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY2]](s32)
268 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
269 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[C1]](s32)
270 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
271 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR1]](s32)
272 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR]](s32)
273 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR2]](s32)
274 ; CHECK-NEXT: $vgpr4 = COPY [[UV1]](s32)
275 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR3]](s32)
276 %0:_(s64) = COPY $vgpr0_vgpr1
277 %1:_(s48) = G_TRUNC %0
278 %2:_(s8), %3:_(s8), %4:_(s8), %5:_(s8), %6:_(s8), %7:_(s8) = G_UNMERGE_VALUES %1
279 %8:_(s32) = G_ANYEXT %2
280 %9:_(s32) = G_ANYEXT %3
281 %10:_(s32) = G_ANYEXT %4
282 %11:_(s32) = G_ANYEXT %5
283 %12:_(s32) = G_ANYEXT %6
284 %13:_(s32) = G_ANYEXT %7
294 name: test_unmerge_s16_s48
297 liveins: $vgpr0_vgpr1
298 ; CHECK-LABEL: name: test_unmerge_s16_s48
299 ; CHECK: liveins: $vgpr0_vgpr1
301 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
302 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
303 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
304 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
305 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
306 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
307 ; CHECK-NEXT: $vgpr2 = COPY [[UV1]](s32)
308 %0:_(s64) = COPY $vgpr0_vgpr1
309 %1:_(s48) = G_TRUNC %0
310 %2:_(s16), %3:_(s16), %4:_(s16) = G_UNMERGE_VALUES %1
311 %5:_(s32) = G_ANYEXT %2
312 %6:_(s32) = G_ANYEXT %3
313 %7:_(s32) = G_ANYEXT %4
320 name: test_unmerge_s8_s64
323 liveins: $vgpr0_vgpr1
324 ; CHECK-LABEL: name: test_unmerge_s8_s64
325 ; CHECK: liveins: $vgpr0_vgpr1
327 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
328 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
329 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
330 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
331 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
332 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
333 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
334 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
335 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
336 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY1]](s32)
337 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
338 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
339 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY2]](s32)
340 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
341 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
342 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY3]](s32)
343 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
344 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
345 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
346 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR2]](s32)
347 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR]](s32)
348 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR3]](s32)
349 ; CHECK-NEXT: $vgpr4 = COPY [[UV1]](s32)
350 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR4]](s32)
351 ; CHECK-NEXT: $vgpr6 = COPY [[LSHR1]](s32)
352 ; CHECK-NEXT: $vgpr7 = COPY [[LSHR5]](s32)
353 %0:_(s64) = COPY $vgpr0_vgpr1
354 %1:_(s8), %2:_(s8), %3:_(s8), %4:_(s8), %5:_(s8), %6:_(s8), %7:_(s8), %8:_(s8) = G_UNMERGE_VALUES %0
355 %10:_(s32) = G_ANYEXT %1
356 %11:_(s32) = G_ANYEXT %2
357 %12:_(s32) = G_ANYEXT %3
358 %13:_(s32) = G_ANYEXT %4
359 %14:_(s32) = G_ANYEXT %5
360 %15:_(s32) = G_ANYEXT %6
361 %16:_(s32) = G_ANYEXT %7
362 %17:_(s32) = G_ANYEXT %8
374 name: test_unmerge_s8_p1
377 liveins: $vgpr0_vgpr1
378 ; CHECK-LABEL: name: test_unmerge_s8_p1
379 ; CHECK: liveins: $vgpr0_vgpr1
381 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
382 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](p1)
383 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
384 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
385 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
386 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
387 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
388 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
389 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
390 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY1]](s32)
391 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
392 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
393 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY2]](s32)
394 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
395 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
396 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY3]](s32)
397 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
398 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[C1]](s32)
399 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
400 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR2]](s32)
401 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR]](s32)
402 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR3]](s32)
403 ; CHECK-NEXT: $vgpr4 = COPY [[UV1]](s32)
404 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR4]](s32)
405 ; CHECK-NEXT: $vgpr6 = COPY [[LSHR1]](s32)
406 ; CHECK-NEXT: $vgpr7 = COPY [[LSHR5]](s32)
407 %0:_(p1) = COPY $vgpr0_vgpr1
408 %1:_(s8), %2:_(s8), %3:_(s8), %4:_(s8), %5:_(s8), %6:_(s8), %7:_(s8), %8:_(s8) = G_UNMERGE_VALUES %0
409 %10:_(s32) = G_ANYEXT %1
410 %11:_(s32) = G_ANYEXT %2
411 %12:_(s32) = G_ANYEXT %3
412 %13:_(s32) = G_ANYEXT %4
413 %14:_(s32) = G_ANYEXT %5
414 %15:_(s32) = G_ANYEXT %6
415 %16:_(s32) = G_ANYEXT %7
416 %17:_(s32) = G_ANYEXT %8
428 name: test_unmerge_s4_p1
431 liveins: $vgpr0_vgpr1
432 ; CHECK-LABEL: name: test_unmerge_s4_p1
433 ; CHECK: liveins: $vgpr0_vgpr1
435 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
436 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](p1)
437 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
438 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
439 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
440 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
441 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
442 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
443 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
444 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND]], [[COPY1]](s32)
445 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
446 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
447 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
448 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[COPY2]](s32)
449 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
450 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
451 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[UV]], [[C2]]
452 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[AND2]], [[COPY3]](s32)
453 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
454 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
455 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[AND3]], [[COPY4]](s32)
456 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
457 ; CHECK-NEXT: [[AND4:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
458 ; CHECK-NEXT: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[AND4]], [[COPY5]](s32)
459 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
460 ; CHECK-NEXT: [[AND5:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C2]]
461 ; CHECK-NEXT: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[AND5]], [[COPY6]](s32)
462 ; CHECK-NEXT: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
463 ; CHECK-NEXT: [[AND6:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
464 ; CHECK-NEXT: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[AND6]], [[COPY7]](s32)
465 ; CHECK-NEXT: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
466 ; CHECK-NEXT: [[AND7:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
467 ; CHECK-NEXT: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[AND7]], [[COPY8]](s32)
468 ; CHECK-NEXT: [[COPY9:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
469 ; CHECK-NEXT: [[AND8:%[0-9]+]]:_(s32) = G_AND [[UV1]], [[C2]]
470 ; CHECK-NEXT: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[AND8]], [[COPY9]](s32)
471 ; CHECK-NEXT: [[AND9:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
472 ; CHECK-NEXT: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[AND9]], [[C1]](s32)
473 ; CHECK-NEXT: [[AND10:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
474 ; CHECK-NEXT: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[AND10]], [[C3]](s32)
475 ; CHECK-NEXT: [[AND11:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C2]]
476 ; CHECK-NEXT: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[AND11]], [[C4]](s32)
477 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
478 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR2]](s32)
479 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR3]](s32)
480 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR4]](s32)
481 ; CHECK-NEXT: $vgpr4 = COPY [[LSHR]](s32)
482 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR5]](s32)
483 ; CHECK-NEXT: $vgpr6 = COPY [[LSHR6]](s32)
484 ; CHECK-NEXT: $vgpr7 = COPY [[LSHR7]](s32)
485 ; CHECK-NEXT: $vgpr8 = COPY [[UV1]](s32)
486 ; CHECK-NEXT: $vgpr9 = COPY [[LSHR8]](s32)
487 ; CHECK-NEXT: $vgpr10 = COPY [[LSHR9]](s32)
488 ; CHECK-NEXT: $vgpr11 = COPY [[LSHR10]](s32)
489 ; CHECK-NEXT: $vgpr12 = COPY [[LSHR1]](s32)
490 ; CHECK-NEXT: $vgpr13 = COPY [[LSHR11]](s32)
491 ; CHECK-NEXT: $vgpr14 = COPY [[LSHR12]](s32)
492 ; CHECK-NEXT: $vgpr15 = COPY [[LSHR13]](s32)
493 %0:_(p1) = COPY $vgpr0_vgpr1
494 %1:_(s4), %2:_(s4), %3:_(s4), %4:_(s4), %5:_(s4), %6:_(s4), %7:_(s4), %8:_(s4), %9:_(s4), %10:_(s4), %11:_(s4), %12:_(s4), %13:_(s4), %14:_(s4), %15:_(s4), %16:_(s4) = G_UNMERGE_VALUES %0
495 %17:_(s32) = G_ANYEXT %1
496 %18:_(s32) = G_ANYEXT %2
497 %19:_(s32) = G_ANYEXT %3
498 %20:_(s32) = G_ANYEXT %4
499 %21:_(s32) = G_ANYEXT %5
500 %22:_(s32) = G_ANYEXT %6
501 %23:_(s32) = G_ANYEXT %7
502 %24:_(s32) = G_ANYEXT %8
503 %25:_(s32) = G_ANYEXT %9
504 %26:_(s32) = G_ANYEXT %10
505 %27:_(s32) = G_ANYEXT %11
506 %28:_(s32) = G_ANYEXT %12
507 %29:_(s32) = G_ANYEXT %13
508 %30:_(s32) = G_ANYEXT %14
509 %31:_(s32) = G_ANYEXT %15
510 %32:_(s32) = G_ANYEXT %16
530 name: test_unmerge_s16_p1
533 liveins: $vgpr0_vgpr1
534 ; CHECK-LABEL: name: test_unmerge_s16_p1
535 ; CHECK: liveins: $vgpr0_vgpr1
537 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
538 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](p1)
539 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
540 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
541 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
542 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
543 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
544 ; CHECK-NEXT: $vgpr2 = COPY [[UV1]](s32)
545 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR1]](s32)
546 %0:_(p1) = COPY $vgpr0_vgpr1
547 %1:_(s16), %2:_(s16), %3:_(s16), %4:_(s16) = G_UNMERGE_VALUES %0
548 %5:_(s32) = G_ANYEXT %1
549 %6:_(s32) = G_ANYEXT %2
550 %7:_(s32) = G_ANYEXT %3
551 %8:_(s32) = G_ANYEXT %4
559 name: test_unmerge_s32_p1
562 liveins: $vgpr0_vgpr1
563 ; CHECK-LABEL: name: test_unmerge_s32_p1
564 ; CHECK: liveins: $vgpr0_vgpr1
566 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p1) = COPY $vgpr0_vgpr1
567 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](p1)
568 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
569 ; CHECK-NEXT: $vgpr1 = COPY [[UV1]](s32)
570 %0:_(p1) = COPY $vgpr0_vgpr1
571 %1:_(s32), %2:_(s32) = G_UNMERGE_VALUES %0
577 name: test_unmerge_s16_s32
581 ; CHECK-LABEL: name: test_unmerge_s16_s32
582 ; CHECK: liveins: $vgpr0
584 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
585 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
586 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
587 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
588 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
589 %0:_(s32) = COPY $vgpr0
590 %1:_(s16), %2:_(s16) = G_UNMERGE_VALUES %0
591 %3:_(s32) = G_ANYEXT %1
592 %4:_(s32) = G_ANYEXT %2
598 name: test_unmerge_s16_p3
602 ; CHECK-LABEL: name: test_unmerge_s16_p3
603 ; CHECK: liveins: $vgpr0
605 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
606 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
607 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
608 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
609 ; CHECK-NEXT: $vgpr0 = COPY [[PTRTOINT]](s32)
610 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
611 %0:_(p3) = COPY $vgpr0
612 %1:_(s16), %2:_(s16) = G_UNMERGE_VALUES %0
613 %3:_(s32) = G_ANYEXT %1
614 %4:_(s32) = G_ANYEXT %2
620 name: test_unmerge_s8_p3
624 ; CHECK-LABEL: name: test_unmerge_s8_p3
625 ; CHECK: liveins: $vgpr0
627 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p3) = COPY $vgpr0
628 ; CHECK-NEXT: [[PTRTOINT:%[0-9]+]]:_(s32) = G_PTRTOINT [[COPY]](p3)
629 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
630 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C]](s32)
631 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
632 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C1]](s32)
633 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
634 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[PTRTOINT]], [[C2]](s32)
635 ; CHECK-NEXT: $vgpr0 = COPY [[PTRTOINT]](s32)
636 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
637 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
638 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR2]](s32)
639 %0:_(p3) = COPY $vgpr0
640 %1:_(s8), %2:_(s8), %3:_(s8), %4:_(s8) = G_UNMERGE_VALUES %0
641 %5:_(s32) = G_ANYEXT %1
642 %6:_(s32) = G_ANYEXT %2
643 %7:_(s32) = G_ANYEXT %3
644 %8:_(s32) = G_ANYEXT %4
653 name: test_unmerge_s16_s64
656 liveins: $vgpr0_vgpr1
657 ; CHECK-LABEL: name: test_unmerge_s16_s64
658 ; CHECK: liveins: $vgpr0_vgpr1
660 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
661 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](s64)
662 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
663 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
664 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
665 ; CHECK-NEXT: $vgpr0 = COPY [[UV]](s32)
666 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
667 ; CHECK-NEXT: $vgpr2 = COPY [[UV1]](s32)
668 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR1]](s32)
669 %0:_(s64) = COPY $vgpr0_vgpr1
670 %1:_(s16), %2:_(s16), %3:_(s16), %4:_(s16) = G_UNMERGE_VALUES %0
671 %5:_(s32) = G_ANYEXT %1
672 %6:_(s32) = G_ANYEXT %2
673 %7:_(s32) = G_ANYEXT %3
674 %8:_(s32) = G_ANYEXT %4
682 name: test_unmerge_s1_s3
686 ; CHECK-LABEL: name: test_unmerge_s1_s3
687 ; CHECK: liveins: $vgpr0
689 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
690 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
691 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
692 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
693 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
694 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
695 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
696 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
697 %0:_(s32) = COPY $vgpr0
698 %1:_(s3) = G_TRUNC %0
699 %2:_(s1), %3:_(s1), %4:_(s1) = G_UNMERGE_VALUES %1
700 %5:_(s32) = G_ANYEXT %2
701 %6:_(s32) = G_ANYEXT %3
702 %7:_(s32) = G_ANYEXT %4
709 name: test_unmerge_s1_s8
713 ; CHECK-LABEL: name: test_unmerge_s1_s8
714 ; CHECK: liveins: $vgpr0
716 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
717 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
718 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
719 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
720 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
721 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
722 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C2]](s32)
723 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
724 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C3]](s32)
725 ; CHECK-NEXT: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
726 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C4]](s32)
727 ; CHECK-NEXT: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 6
728 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C5]](s32)
729 ; CHECK-NEXT: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
730 ; CHECK-NEXT: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C6]](s32)
731 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
732 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
733 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
734 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR2]](s32)
735 ; CHECK-NEXT: $vgpr4 = COPY [[LSHR3]](s32)
736 ; CHECK-NEXT: $vgpr5 = COPY [[LSHR4]](s32)
737 ; CHECK-NEXT: $vgpr6 = COPY [[LSHR5]](s32)
738 ; CHECK-NEXT: $vgpr7 = COPY [[LSHR6]](s32)
739 %0:_(s32) = COPY $vgpr0
740 %1:_(s8) = G_TRUNC %0
741 %2:_(s1), %3:_(s1), %4:_(s1), %5:_(s1), %6:_(s1), %7:_(s1), %8:_(s1), %9:_(s1) = G_UNMERGE_VALUES %1
742 %10:_(s32) = G_ANYEXT %2
743 %11:_(s32) = G_ANYEXT %3
744 %12:_(s32) = G_ANYEXT %4
745 %13:_(s32) = G_ANYEXT %5
746 %14:_(s32) = G_ANYEXT %6
747 %15:_(s32) = G_ANYEXT %7
748 %16:_(s32) = G_ANYEXT %8
749 %17:_(s32) = G_ANYEXT %9
762 name: test_unmerge_s128_v2s128
765 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
766 ; CHECK-LABEL: name: test_unmerge_s128_v2s128
767 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
769 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
770 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s128), [[UV1:%[0-9]+]]:_(s128) = G_UNMERGE_VALUES [[COPY]](<2 x s128>)
771 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[UV]](s128)
772 ; CHECK-NEXT: $vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[UV1]](s128)
773 %0:_(<2 x s128>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
774 %1:_(s128), %2:_(s128) = G_UNMERGE_VALUES %0
775 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
776 $vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
781 name: test_unmerge_s128_s256
784 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
785 ; CHECK-LABEL: name: test_unmerge_s128_s256
786 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
788 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
789 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s128), [[UV1:%[0-9]+]]:_(s128) = G_UNMERGE_VALUES [[COPY]](s256)
790 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[UV]](s128)
791 ; CHECK-NEXT: $vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[UV1]](s128)
792 %0:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
793 %1:_(s128), %2:_(s128) = G_UNMERGE_VALUES %0
794 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
795 $vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
800 name: test_unmerge_s256_s512
803 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
805 ; CHECK-LABEL: name: test_unmerge_s256_s512
806 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
808 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s512) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
809 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s256), [[UV1:%[0-9]+]]:_(s256) = G_UNMERGE_VALUES [[COPY]](s512)
810 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[UV]](s256)
811 ; CHECK-NEXT: $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[UV1]](s256)
812 %0:_(s512) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
813 %1:_(s256), %2:_(s256) = G_UNMERGE_VALUES %0
814 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %1
815 $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %2
820 name: test_unmerge_s256_v2s256
823 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
825 ; CHECK-LABEL: name: test_unmerge_s256_v2s256
826 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
828 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s256>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
829 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s256), [[UV1:%[0-9]+]]:_(s256) = G_UNMERGE_VALUES [[COPY]](<2 x s256>)
830 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[UV]](s256)
831 ; CHECK-NEXT: $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[UV1]](s256)
832 %0:_(<2 x s256>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
833 %1:_(s256), %2:_(s256) = G_UNMERGE_VALUES %0
834 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %1
835 $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %2
840 name: test_unmerge_s512_s1024
843 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
845 ; CHECK-LABEL: name: test_unmerge_s512_s1024
846 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
848 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s1024) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
849 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s512), [[UV1:%[0-9]+]]:_(s512) = G_UNMERGE_VALUES [[COPY]](s1024)
850 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[UV]](s512)
851 ; CHECK-NEXT: $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY [[UV1]](s512)
852 %0:_(s1024) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
853 %1:_(s512), %2:_(s512) = G_UNMERGE_VALUES %0
854 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %1
855 $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY %2
860 name: test_unmerge_s512_v2s512
863 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
865 ; CHECK-LABEL: name: test_unmerge_s512_v2s512
866 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
868 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s512>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
869 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s512), [[UV1:%[0-9]+]]:_(s512) = G_UNMERGE_VALUES [[COPY]](<2 x s512>)
870 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[UV]](s512)
871 ; CHECK-NEXT: $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY [[UV1]](s512)
872 %0:_(<2 x s512>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
873 %1:_(s512), %2:_(s512) = G_UNMERGE_VALUES %0
874 $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %1
875 $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY %2
879 name: test_unmerge_v2s1
882 ; CHECK-LABEL: name: test_unmerge_v2s1
883 ; CHECK: [[DEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
884 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<2 x s32>)
885 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[UV]](s32)
886 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s1) = G_TRUNC [[UV1]](s32)
887 ; CHECK-NEXT: S_NOP 0, implicit [[TRUNC]](s1)
888 ; CHECK-NEXT: S_NOP 0, implicit [[TRUNC1]](s1)
889 %0:_(<2 x s1>) = G_IMPLICIT_DEF
890 %1:_(s1), %2:_(s1) = G_UNMERGE_VALUES %0
896 name: test_unmerge_s8_v4s8
901 ; CHECK-LABEL: name: test_unmerge_s8_v4s8
902 ; CHECK: liveins: $vgpr0
904 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
905 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
906 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
907 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
908 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
909 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
910 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C2]](s32)
911 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
912 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
913 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
914 ; CHECK-NEXT: $vgpr3 = COPY [[LSHR2]](s32)
915 %0:_(s32) = COPY $vgpr0
916 %1:_(<4 x s8>) = G_BITCAST %0
917 %2:_(s8), %3:_(s8), %4:_(s8), %5:_(s8) = G_UNMERGE_VALUES %1
918 %6:_(s32) = G_ANYEXT %2
919 %7:_(s32) = G_ANYEXT %3
920 %8:_(s32) = G_ANYEXT %4
921 %9:_(s32) = G_ANYEXT %5
929 name: test_unmerge_s8_v3s8
934 ; CHECK-LABEL: name: test_unmerge_s8_v3s8
935 ; CHECK: liveins: $vgpr0
937 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
938 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
939 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
940 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
941 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C1]](s32)
942 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
943 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
944 ; CHECK-NEXT: $vgpr2 = COPY [[LSHR1]](s32)
945 %0:_(s32) = COPY $vgpr0
946 %1:_(s24) = G_TRUNC %0
947 %2:_(<3 x s8>) = G_BITCAST %1
948 %3:_(s8), %4:_(s8), %5:_(s8) = G_UNMERGE_VALUES %2
949 %6:_(s32) = G_ANYEXT %3
950 %7:_(s32) = G_ANYEXT %4
951 %8:_(s32) = G_ANYEXT %5
958 name: test_unmerge_s8_v2s8
963 ; CHECK-LABEL: name: test_unmerge_s8_v2s8
964 ; CHECK: liveins: $vgpr0
966 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
967 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
968 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]](s32)
969 ; CHECK-NEXT: $vgpr0 = COPY [[COPY]](s32)
970 ; CHECK-NEXT: $vgpr1 = COPY [[LSHR]](s32)
971 %0:_(s32) = COPY $vgpr0
972 %1:_(s16) = G_TRUNC %0
973 %2:_(<2 x s8>) = G_BITCAST %1
974 %3:_(s8), %4:_(s8) = G_UNMERGE_VALUES %2
975 %5:_(s32) = G_ANYEXT %3
976 %6:_(s32) = G_ANYEXT %4
983 name: test_unmerge_v3s32_v12s32
986 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5, $vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11
988 ; CHECK-LABEL: name: test_unmerge_v3s32_v12s32
989 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5, $vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11
991 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
992 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<6 x s32>) = COPY $vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11
993 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<3 x s32>), [[UV1:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY]](<6 x s32>)
994 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<3 x s32>), [[UV3:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY1]](<6 x s32>)
995 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[UV]](<3 x s32>)
996 ; CHECK-NEXT: $vgpr3_vgpr4_vgpr5 = COPY [[UV1]](<3 x s32>)
997 ; CHECK-NEXT: $vgpr6_vgpr7_vgpr8 = COPY [[UV2]](<3 x s32>)
998 ; CHECK-NEXT: $vgpr9_vgpr10_vgpr11 = COPY [[UV3]](<3 x s32>)
999 %0:_(<6 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
1000 %1:_(<6 x s32>) = COPY $vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11
1001 %2:_(<12 x s32>) = G_CONCAT_VECTORS %0, %1
1002 %3:_(<3 x s32>), %4:_(<3 x s32>), %5:_(<3 x s32>), %6:_(<3 x s32>) = G_UNMERGE_VALUES %2
1003 $vgpr0_vgpr1_vgpr2 = COPY %3
1004 $vgpr3_vgpr4_vgpr5 = COPY %4
1005 $vgpr6_vgpr7_vgpr8 = COPY %5
1006 $vgpr9_vgpr10_vgpr11 = COPY %6
1011 name: test_unmerge_v3s8_v12s8
1014 liveins: $vgpr0_vgpr1_vgpr2
1016 ; CHECK-LABEL: name: test_unmerge_v3s8_v12s8
1017 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
1018 ; CHECK-NEXT: {{ $}}
1019 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1020 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
1021 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1022 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C]](s32)
1023 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1024 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C1]](s32)
1025 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
1026 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[UV]], [[C2]](s32)
1027 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C]](s32)
1028 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C1]](s32)
1029 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[UV1]], [[C2]](s32)
1030 ; CHECK-NEXT: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C]](s32)
1031 ; CHECK-NEXT: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C1]](s32)
1032 ; CHECK-NEXT: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[UV2]], [[C2]](s32)
1033 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[LSHR]](s32), [[LSHR1]](s32)
1034 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[LSHR2]](s32), [[UV1]](s32), [[LSHR3]](s32)
1035 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[LSHR4]](s32), [[LSHR5]](s32), [[UV2]](s32)
1036 ; CHECK-NEXT: [[BUILD_VECTOR3:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[LSHR6]](s32), [[LSHR7]](s32), [[LSHR8]](s32)
1037 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
1038 ; CHECK-NEXT: $vgpr3_vgpr4_vgpr5 = COPY [[BUILD_VECTOR1]](<3 x s32>)
1039 ; CHECK-NEXT: $vgpr6_vgpr7_vgpr8 = COPY [[BUILD_VECTOR2]](<3 x s32>)
1040 ; CHECK-NEXT: $vgpr9_vgpr10_vgpr11 = COPY [[BUILD_VECTOR3]](<3 x s32>)
1041 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
1042 %1:_(<12 x s8>) = G_BITCAST %0
1043 %2:_(<3 x s8>), %3:_(<3 x s8>), %4:_(<3 x s8>), %5:_(<3 x s8>) = G_UNMERGE_VALUES %1
1044 %6:_(<3 x s32>) = G_ANYEXT %2
1045 %7:_(<3 x s32>) = G_ANYEXT %3
1046 %8:_(<3 x s32>) = G_ANYEXT %4
1047 %9:_(<3 x s32>) = G_ANYEXT %5
1048 $vgpr0_vgpr1_vgpr2 = COPY %6
1049 $vgpr3_vgpr4_vgpr5 = COPY %7
1050 $vgpr6_vgpr7_vgpr8 = COPY %8
1051 $vgpr9_vgpr10_vgpr11 = COPY %9
1056 name: test_unmerge_v3s16_v12s16
1059 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
1061 ; CHECK-LABEL: name: test_unmerge_v3s16_v12s16
1062 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
1063 ; CHECK-NEXT: {{ $}}
1064 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
1065 ; 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>), [[UV4:%[0-9]+]]:_(<2 x s16>), [[UV5:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
1066 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1067 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1068 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1069 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1070 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[BITCAST]](s32), [[LSHR]](s32), [[BITCAST1]](s32)
1071 ; CHECK-NEXT: [[UV6:%[0-9]+]]:_(<2 x s16>), [[UV7:%[0-9]+]]:_(<2 x s16>), [[UV8:%[0-9]+]]:_(<2 x s16>), [[UV9:%[0-9]+]]:_(<2 x s16>), [[UV10:%[0-9]+]]:_(<2 x s16>), [[UV11:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
1072 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV7]](<2 x s16>)
1073 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
1074 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[UV8]](<2 x s16>)
1075 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C]](s32)
1076 ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[LSHR1]](s32), [[BITCAST3]](s32), [[LSHR2]](s32)
1077 ; CHECK-NEXT: [[UV12:%[0-9]+]]:_(<2 x s16>), [[UV13:%[0-9]+]]:_(<2 x s16>), [[UV14:%[0-9]+]]:_(<2 x s16>), [[UV15:%[0-9]+]]:_(<2 x s16>), [[UV16:%[0-9]+]]:_(<2 x s16>), [[UV17:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
1078 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(s32) = G_BITCAST [[UV15]](<2 x s16>)
1079 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST4]], [[C]](s32)
1080 ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(s32) = G_BITCAST [[UV16]](<2 x s16>)
1081 ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[BITCAST4]](s32), [[LSHR3]](s32), [[BITCAST5]](s32)
1082 ; CHECK-NEXT: [[UV18:%[0-9]+]]:_(<2 x s16>), [[UV19:%[0-9]+]]:_(<2 x s16>), [[UV20:%[0-9]+]]:_(<2 x s16>), [[UV21:%[0-9]+]]:_(<2 x s16>), [[UV22:%[0-9]+]]:_(<2 x s16>), [[UV23:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
1083 ; CHECK-NEXT: [[BITCAST6:%[0-9]+]]:_(s32) = G_BITCAST [[UV22]](<2 x s16>)
1084 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST6]], [[C]](s32)
1085 ; CHECK-NEXT: [[BITCAST7:%[0-9]+]]:_(s32) = G_BITCAST [[UV23]](<2 x s16>)
1086 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST7]], [[C]](s32)
1087 ; CHECK-NEXT: [[BUILD_VECTOR3:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[LSHR4]](s32), [[BITCAST7]](s32), [[LSHR5]](s32)
1088 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
1089 ; CHECK-NEXT: $vgpr3_vgpr4_vgpr5 = COPY [[BUILD_VECTOR1]](<3 x s32>)
1090 ; CHECK-NEXT: $vgpr6_vgpr7_vgpr8 = COPY [[BUILD_VECTOR2]](<3 x s32>)
1091 ; CHECK-NEXT: $vgpr9_vgpr10_vgpr11 = COPY [[BUILD_VECTOR3]](<3 x s32>)
1092 %0:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
1093 %1:_(<3 x s16>), %2:_(<3 x s16>), %3:_(<3 x s16>), %4:_(<3 x s16>) = G_UNMERGE_VALUES %0
1094 %5:_(<3 x s32>) = G_ANYEXT %1
1095 %6:_(<3 x s32>) = G_ANYEXT %2
1096 %7:_(<3 x s32>) = G_ANYEXT %3
1097 %8:_(<3 x s32>) = G_ANYEXT %4
1098 $vgpr0_vgpr1_vgpr2 = COPY %5
1099 $vgpr3_vgpr4_vgpr5 = COPY %6
1100 $vgpr6_vgpr7_vgpr8 = COPY %7
1101 $vgpr9_vgpr10_vgpr11 = COPY %8