1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
5 name: test_insert_s64_s32_offset0
8 liveins: $vgpr0_vgpr1, $vgpr2
10 ; CHECK-LABEL: name: test_insert_s64_s32_offset0
11 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
14 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
15 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
16 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
17 %0:_(s64) = COPY $vgpr0_vgpr1
18 %1:_(s32) = COPY $vgpr2
19 %2:_(s64) = G_INSERT %0, %1, 0
20 $vgpr0_vgpr1 = COPY %2
23 name: test_insert_s64_s32_offset32
26 liveins: $vgpr0_vgpr1, $vgpr2
28 ; CHECK-LABEL: name: test_insert_s64_s32_offset32
29 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
31 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
32 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
33 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 32
34 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
35 %0:_(s64) = COPY $vgpr0_vgpr1
36 %1:_(s32) = COPY $vgpr2
37 %2:_(s64) = G_INSERT %0, %1, 32
38 $vgpr0_vgpr1 = COPY %2
42 name: test_insert_s64_s32_offset16
45 liveins: $vgpr0_vgpr1, $vgpr2
47 ; CHECK-LABEL: name: test_insert_s64_s32_offset16
48 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
50 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
51 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
52 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 16
53 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
54 %0:_(s64) = COPY $vgpr0_vgpr1
55 %1:_(s32) = COPY $vgpr2
56 %2:_(s64) = G_INSERT %0, %1, 16
57 $vgpr0_vgpr1 = COPY %2
61 name: test_insert_s96_s32_offset0
64 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
66 ; CHECK-LABEL: name: test_insert_s96_s32_offset0
67 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
69 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
70 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
71 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 0
72 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
73 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
74 %1:_(s32) = COPY $vgpr3
75 %2:_(s96) = G_INSERT %0, %1, 0
76 $vgpr0_vgpr1_vgpr2 = COPY %2
79 name: test_insert_s96_s32_offset32
82 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
84 ; CHECK-LABEL: name: test_insert_s96_s32_offset32
85 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
87 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
88 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
89 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 32
90 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
91 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
92 %1:_(s32) = COPY $vgpr3
93 %2:_(s96) = G_INSERT %0, %1, 32
94 $vgpr0_vgpr1_vgpr2 = COPY %2
97 name: test_insert_s96_s32_offset64
100 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
102 ; CHECK-LABEL: name: test_insert_s96_s32_offset64
103 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
105 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
106 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
107 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 64
108 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
109 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
110 %1:_(s32) = COPY $vgpr3
111 %2:_(s96) = G_INSERT %0, %1, 64
112 $vgpr0_vgpr1_vgpr2 = COPY %2
115 name: test_insert_s128_s32_offset0
118 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
120 ; CHECK-LABEL: name: test_insert_s128_s32_offset0
121 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
123 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
124 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
125 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 0
126 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
127 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
128 %1:_(s32) = COPY $vgpr4
129 %2:_(s128) = G_INSERT %0, %1, 0
130 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
133 name: test_insert_s128_s32_offset32
136 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
138 ; CHECK-LABEL: name: test_insert_s128_s32_offset32
139 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
141 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
142 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
143 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 32
144 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
145 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
146 %1:_(s32) = COPY $vgpr4
147 %2:_(s128) = G_INSERT %0, %1, 32
148 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
151 name: test_insert_s128_s32_offset64
154 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
156 ; CHECK-LABEL: name: test_insert_s128_s32_offset64
157 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
159 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
160 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
161 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 64
162 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
163 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
164 %1:_(s32) = COPY $vgpr4
165 %2:_(s128) = G_INSERT %0, %1, 64
166 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
169 name: test_insert_s128_s32_offset96
172 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
174 ; CHECK-LABEL: name: test_insert_s128_s32_offset96
175 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
177 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
178 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
179 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 96
180 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
181 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
182 %1:_(s32) = COPY $vgpr4
183 %2:_(s128) = G_INSERT %0, %1, 96
184 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
187 name: test_insert_s128_s64_offset0
190 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
192 ; CHECK-LABEL: name: test_insert_s128_s64_offset0
193 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
195 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
196 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
197 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 0
198 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
199 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
200 %1:_(s64) = COPY $vgpr4_vgpr5
201 %2:_(s128) = G_INSERT %0, %1, 0
202 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
205 name: test_insert_s128_s64_offset32
208 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
210 ; CHECK-LABEL: name: test_insert_s128_s64_offset32
211 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
213 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
214 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
215 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 32
216 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
217 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
218 %1:_(s64) = COPY $vgpr4_vgpr5
219 %2:_(s128) = G_INSERT %0, %1, 32
220 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
223 name: test_insert_s128_s64_offset64
226 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
228 ; CHECK-LABEL: name: test_insert_s128_s64_offset64
229 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
231 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
232 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
233 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 64
234 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
235 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
236 %1:_(s64) = COPY $vgpr4_vgpr5
237 %2:_(s128) = G_INSERT %0, %1, 64
238 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
241 name: test_insert_s128_s96_offset0
244 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
246 ; CHECK-LABEL: name: test_insert_s128_s96_offset0
247 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
249 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
250 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
251 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 0
252 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
253 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
254 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
255 %2:_(s128) = G_INSERT %0, %1, 0
256 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
259 name: test_insert_s128_s96_offset32
262 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
264 ; CHECK-LABEL: name: test_insert_s128_s96_offset32
265 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
267 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
268 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
269 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 32
270 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
271 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
272 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
273 %2:_(s128) = G_INSERT %0, %1, 32
274 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
277 name: test_insert_p0_s32_offset0
280 liveins: $vgpr0_vgpr1, $vgpr2
282 ; CHECK-LABEL: name: test_insert_p0_s32_offset0
283 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
285 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
286 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
287 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 0
288 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
289 %0:_(p0) = COPY $vgpr0_vgpr1
290 %1:_(s32) = COPY $vgpr2
291 %2:_(p0) = G_INSERT %0, %1, 0
292 $vgpr0_vgpr1 = COPY %2
295 name: test_insert_p0_s32_offset32
298 liveins: $vgpr0_vgpr1, $vgpr2
300 ; CHECK-LABEL: name: test_insert_p0_s32_offset32
301 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
303 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
304 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
305 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 32
306 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
307 %0:_(p0) = COPY $vgpr0_vgpr1
308 %1:_(s32) = COPY $vgpr2
309 %2:_(p0) = G_INSERT %0, %1, 32
310 $vgpr0_vgpr1 = COPY %2
313 name: test_insert_s128_p0_offset0
316 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
318 ; CHECK-LABEL: name: test_insert_s128_p0_offset0
319 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
321 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
322 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
323 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 0
324 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
325 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
326 %1:_(p0) = COPY $vgpr4_vgpr5
327 %2:_(s128) = G_INSERT %0, %1, 0
328 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
331 name: test_insert_s128_p0_offset32
334 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
336 ; CHECK-LABEL: name: test_insert_s128_p0_offset32
337 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
339 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
340 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
341 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 32
342 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
343 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
344 %1:_(p0) = COPY $vgpr4_vgpr5
345 %2:_(s128) = G_INSERT %0, %1, 32
346 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
349 name: test_insert_s128_p0_offset64
352 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
354 ; CHECK-LABEL: name: test_insert_s128_p0_offset64
355 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
357 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
358 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
359 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 64
360 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
361 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
362 %1:_(p0) = COPY $vgpr4_vgpr5
363 %2:_(s128) = G_INSERT %0, %1, 64
364 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
368 name: test_insert_s128_s16_offset0
371 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
373 ; CHECK-LABEL: name: test_insert_s128_s16_offset0
374 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
376 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
377 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
378 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
379 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
380 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
381 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
382 %1:_(s32) = COPY $vgpr4
383 %2:_(s16) = G_TRUNC %1
384 %3:_(s128) = G_INSERT %0, %2, 0
385 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
389 name: test_insert_s128_s16_offset16
392 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
394 ; CHECK-LABEL: name: test_insert_s128_s16_offset16
395 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
397 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
398 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
399 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
400 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
401 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
402 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
403 %1:_(s32) = COPY $vgpr4
404 %2:_(s16) = G_TRUNC %1
405 %3:_(s128) = G_INSERT %0, %2, 16
406 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
410 name: test_insert_s128_s16_offset32
413 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
415 ; CHECK-LABEL: name: test_insert_s128_s16_offset32
416 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
418 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
419 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
420 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
421 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
422 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
423 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
424 %1:_(s32) = COPY $vgpr4
425 %2:_(s16) = G_TRUNC %1
426 %3:_(s128) = G_INSERT %0, %2, 32
427 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
431 name: test_insert_s128_s16_offset112
434 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
436 ; CHECK-LABEL: name: test_insert_s128_s16_offset112
437 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
439 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
440 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
441 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
442 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 112
443 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
444 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
445 %1:_(s32) = COPY $vgpr4
446 %2:_(s16) = G_TRUNC %1
447 %3:_(s128) = G_INSERT %0, %2, 112
448 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
452 name: test_insert_v2s32_s32_offset0
455 liveins: $vgpr0_vgpr1, $vgpr2
457 ; CHECK-LABEL: name: test_insert_v2s32_s32_offset0
458 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
460 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
461 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
462 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
463 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY1]](s32), [[UV1]](s32)
464 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
465 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
466 %1:_(s32) = COPY $vgpr2
467 %2:_(<2 x s32>) = G_INSERT %0, %1, 0
468 $vgpr0_vgpr1 = COPY %2
471 name: test_insert_v2s32_s32_offset32
474 liveins: $vgpr0_vgpr1, $vgpr2
476 ; CHECK-LABEL: name: test_insert_v2s32_s32_offset32
477 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
479 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
480 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
481 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
482 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[COPY1]](s32)
483 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
484 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
485 %1:_(s32) = COPY $vgpr2
486 %2:_(<2 x s32>) = G_INSERT %0, %1, 32
487 $vgpr0_vgpr1 = COPY %2
490 name: test_insert_v3s32_s32_offset0
493 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
495 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset0
496 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
498 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
499 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
500 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
501 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[COPY1]](s32), [[UV1]](s32), [[UV2]](s32)
502 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
503 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
504 %1:_(s32) = COPY $vgpr3
505 %2:_(<3 x s32>) = G_INSERT %0, %1, 0
506 $vgpr0_vgpr1_vgpr2 = COPY %2
509 name: test_insert_v3s32_s32_offset32
512 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
514 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset32
515 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
517 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
518 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
519 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
520 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[COPY1]](s32), [[UV2]](s32)
521 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
522 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
523 %1:_(s32) = COPY $vgpr3
524 %2:_(<3 x s32>) = G_INSERT %0, %1, 32
525 $vgpr0_vgpr1_vgpr2 = COPY %2
528 name: test_insert_v3s32_s32_offset64
531 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
533 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset64
534 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
536 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
537 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
538 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
539 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[COPY1]](s32)
540 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
541 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
542 %1:_(s32) = COPY $vgpr3
543 %2:_(<3 x s32>) = G_INSERT %0, %1, 64
544 $vgpr0_vgpr1_vgpr2 = COPY %2
547 name: test_insert_v4s32_s32_offset0
550 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
552 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset0
553 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
555 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
556 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
557 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
558 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY1]](s32), [[UV1]](s32), [[UV2]](s32), [[UV3]](s32)
559 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
560 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
561 %1:_(s32) = COPY $vgpr4
562 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
563 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
566 name: test_insert_v4s32_s32_offset32
569 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
571 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset32
572 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
574 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
575 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
576 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
577 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[COPY1]](s32), [[UV2]](s32), [[UV3]](s32)
578 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
579 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
580 %1:_(s32) = COPY $vgpr4
581 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
582 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
585 name: test_insert_v4s32_s32_offset64
588 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
590 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset64
591 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
593 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
594 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
595 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
596 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[COPY1]](s32), [[UV3]](s32)
597 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
598 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
599 %1:_(s32) = COPY $vgpr4
600 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
601 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
604 name: test_insert_v4s32_s32_offset96
607 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
609 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset96
610 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
612 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
613 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
614 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
615 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[UV2]](s32), [[COPY1]](s32)
616 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
617 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
618 %1:_(s32) = COPY $vgpr4
619 %2:_(<4 x s32>) = G_INSERT %0, %1, 96
620 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
623 name: test_insert_v4s32_s64_offset0
626 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
628 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset0
629 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
631 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
632 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
633 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
634 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
635 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV4]](s32), [[UV5]](s32), [[UV2]](s32), [[UV3]](s32)
636 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
637 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
638 %1:_(s64) = COPY $vgpr4_vgpr5
639 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
640 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
643 name: test_insert_v4s32_s64_offset32
646 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
648 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset32
649 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
651 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
652 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
653 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
654 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
655 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV4]](s32), [[UV5]](s32), [[UV3]](s32)
656 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
657 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
658 %1:_(s64) = COPY $vgpr4_vgpr5
659 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
660 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
663 name: test_insert_v4s32_s64_offset64
666 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
668 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset64
669 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
671 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
672 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
673 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
674 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
675 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[UV4]](s32), [[UV5]](s32)
676 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
677 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
678 %1:_(s64) = COPY $vgpr4_vgpr5
679 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
680 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
683 name: test_insert_v4s32_s96_offset0
686 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
688 ; CHECK-LABEL: name: test_insert_v4s32_s96_offset0
689 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
691 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
692 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
693 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
694 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s96)
695 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV4]](s32), [[UV5]](s32), [[UV6]](s32), [[UV3]](s32)
696 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
697 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
698 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
699 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
700 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
703 name: test_insert_v4s32_s96_offset32
706 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
708 ; CHECK-LABEL: name: test_insert_v4s32_s96_offset32
709 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
711 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
712 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
713 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
714 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](s96)
715 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV4]](s32), [[UV5]](s32), [[UV6]](s32)
716 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
717 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
718 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
719 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
720 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
723 name: test_insert_v4s32_v2s32_offset0
726 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
728 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset0
729 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
731 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
732 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
733 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
734 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
735 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV4]](s32), [[UV5]](s32), [[UV2]](s32), [[UV3]](s32)
736 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
737 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
738 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
739 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
740 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
743 name: test_insert_v4s32_v2s32_offset32
746 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
748 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset32
749 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
751 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
752 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
753 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
754 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
755 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV4]](s32), [[UV5]](s32), [[UV3]](s32)
756 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
757 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
758 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
759 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
760 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
763 name: test_insert_v4s32_v2s32_offset64
766 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
768 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset64
769 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
771 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
772 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
773 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
774 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
775 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32), [[UV4]](s32), [[UV5]](s32)
776 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
777 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
778 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
779 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
780 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
783 name: test_insert_v4s32_v3s32_offset0
786 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
788 ; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset0
789 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
791 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
792 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
793 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
794 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
795 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV4]](s32), [[UV5]](s32), [[UV6]](s32), [[UV3]](s32)
796 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
797 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
798 %1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
799 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
800 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
803 name: test_insert_v4s32_v3s32_offset32
806 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
808 ; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset32
809 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
811 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
812 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
813 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
814 ; CHECK-NEXT: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
815 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV4]](s32), [[UV5]](s32), [[UV6]](s32)
816 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
817 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
818 %1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
819 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
820 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
823 name: test_insert_v4s32_p0_offset0
826 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
828 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset0
829 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
831 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
832 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
833 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 0
834 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
835 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
836 %1:_(p0) = COPY $vgpr4_vgpr5
837 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
838 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
841 name: test_insert_v4s32_p0_offset32
844 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
846 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset32
847 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
849 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
850 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
851 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 32
852 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
853 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
854 %1:_(p0) = COPY $vgpr4_vgpr5
855 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
856 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
859 name: test_insert_v4s32_p0_offset64
862 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
864 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset64
865 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
867 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
868 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
869 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 64
870 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
871 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
872 %1:_(p0) = COPY $vgpr4_vgpr5
873 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
874 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
878 name: test_insert_v2s16_s16_offset0
881 liveins: $vgpr0, $vgpr1
883 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset0
884 ; CHECK: liveins: $vgpr0, $vgpr1
886 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
887 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
888 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
889 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
890 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
891 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
892 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
893 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
894 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
895 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
896 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
897 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
898 %0:_(<2 x s16>) = COPY $vgpr0
899 %1:_(s32) = COPY $vgpr1
900 %2:_(s16) = G_TRUNC %1
901 %3:_(<2 x s16>) = G_INSERT %0, %2, 0
906 name: test_insert_v2s16_s16_offset1
909 liveins: $vgpr0, $vgpr1
911 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset1
912 ; CHECK: liveins: $vgpr0, $vgpr1
914 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
915 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
916 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
917 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
918 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
919 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
920 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
921 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -131071
922 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C2]]
923 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
924 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
925 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
926 %0:_(<2 x s16>) = COPY $vgpr0
927 %1:_(s32) = COPY $vgpr1
928 %2:_(s16) = G_TRUNC %1
929 %3:_(<2 x s16>) = G_INSERT %0, %2, 1
933 name: test_insert_v2s16_s16_offset16
936 liveins: $vgpr0, $vgpr1
938 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset16
939 ; CHECK: liveins: $vgpr0, $vgpr1
941 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
942 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
943 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
944 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
945 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C]]
946 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
947 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
948 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
949 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
950 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
951 ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
952 %0:_(<2 x s16>) = COPY $vgpr0
953 %1:_(s32) = COPY $vgpr1
954 %2:_(s16) = G_TRUNC %1
955 %3:_(<2 x s16>) = G_INSERT %0, %2, 16
959 name: test_insert_v3s16_s16_offset0
962 liveins: $vgpr0_vgpr1, $vgpr2
964 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset0
965 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
967 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
968 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
969 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
970 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
971 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
972 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
973 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
974 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
975 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
976 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
977 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
978 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
979 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
980 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
981 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
982 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
983 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
984 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
985 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
986 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
987 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
988 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
989 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
990 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
991 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
992 %1:_(<3 x s16>) = G_EXTRACT %0, 0
993 %2:_(s32) = COPY $vgpr2
994 %3:_(s16) = G_TRUNC %2
995 %4:_(<3 x s16>) = G_INSERT %1, %3, 0
996 %5:_(<4 x s16>) = G_IMPLICIT_DEF
997 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
998 $vgpr0_vgpr1 = COPY %6
1001 name: test_insert_v3s16_s16_offset16
1004 liveins: $vgpr0_vgpr1, $vgpr2
1006 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset16
1007 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1008 ; CHECK-NEXT: {{ $}}
1009 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1010 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1011 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1012 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1013 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1014 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1015 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1016 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1017 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1018 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
1019 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1020 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1021 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1022 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1023 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1024 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1025 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
1026 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1027 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1028 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1029 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1030 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
1031 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1032 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1033 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1034 %2:_(s32) = COPY $vgpr2
1035 %3:_(s16) = G_TRUNC %2
1036 %4:_(<3 x s16>) = G_INSERT %1, %3, 16
1037 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1038 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1039 $vgpr0_vgpr1 = COPY %6
1042 name: test_insert_v3s16_s16_offset32
1045 liveins: $vgpr0_vgpr1, $vgpr2
1047 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset32
1048 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1049 ; CHECK-NEXT: {{ $}}
1050 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1051 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1052 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1053 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1054 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1055 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1056 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1057 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1058 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1059 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1060 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1061 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1062 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1063 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1064 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST1]](<2 x s16>)
1065 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1066 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1067 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1068 %2:_(s32) = COPY $vgpr2
1069 %3:_(s16) = G_TRUNC %2
1070 %4:_(<3 x s16>) = G_INSERT %1, %3, 32
1071 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1072 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1073 $vgpr0_vgpr1 = COPY %6
1076 name: test_insert_v3s16_v2s16_offset0
1079 liveins: $vgpr0_vgpr1, $vgpr2
1081 ; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset0
1082 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1083 ; CHECK-NEXT: {{ $}}
1084 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1085 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1086 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1087 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1088 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1089 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1090 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1091 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1092 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1093 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1094 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
1095 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1096 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
1097 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1098 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1099 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1100 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1101 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1102 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1103 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1104 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1105 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1106 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
1107 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1108 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1109 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1110 %2:_(<2 x s16>) = COPY $vgpr2
1111 %4:_(<3 x s16>) = G_INSERT %1, %2, 0
1112 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1113 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1114 $vgpr0_vgpr1 = COPY %6
1117 name: test_insert_v3s16_v2s16_offset16
1120 liveins: $vgpr0_vgpr1, $vgpr2
1122 ; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset16
1123 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1124 ; CHECK-NEXT: {{ $}}
1125 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1126 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1127 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1128 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1129 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1130 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1131 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1132 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1133 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1134 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1135 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
1136 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1137 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1138 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
1139 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1140 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1141 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1142 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1143 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1144 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1145 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1146 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1147 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
1148 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1149 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1150 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1151 %2:_(<2 x s16>) = COPY $vgpr2
1152 %4:_(<3 x s16>) = G_INSERT %1, %2, 16
1153 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1154 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1155 $vgpr0_vgpr1 = COPY %6
1158 name: test_insert_v3s16_s32_offset0
1161 liveins: $vgpr0_vgpr1, $vgpr2
1163 ; CHECK-LABEL: name: test_insert_v3s16_s32_offset0
1164 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1165 ; CHECK-NEXT: {{ $}}
1166 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1167 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1168 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1169 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1170 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1171 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1172 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1173 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1174 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1175 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1176 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1177 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1178 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1179 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1180 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1181 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1182 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1183 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1184 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1185 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1186 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1187 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST2]](<2 x s16>), [[BITCAST3]](<2 x s16>)
1188 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1189 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1190 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1191 %2:_(s32) = COPY $vgpr2
1192 %4:_(<3 x s16>) = G_INSERT %1, %2, 0
1193 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1194 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1195 $vgpr0_vgpr1 = COPY %6
1198 name: test_insert_v3s16_s32_offset16
1201 liveins: $vgpr0_vgpr1, $vgpr2
1203 ; CHECK-LABEL: name: test_insert_v3s16_s32_offset16
1204 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1205 ; CHECK-NEXT: {{ $}}
1206 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1207 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1208 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1209 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1210 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1211 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1212 ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1213 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
1214 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1215 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1216 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1217 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1218 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1219 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1220 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1221 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1222 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1223 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1224 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1225 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1226 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1227 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST2]](<2 x s16>), [[BITCAST3]](<2 x s16>)
1228 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1229 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1230 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1231 %2:_(s32) = COPY $vgpr2
1232 %4:_(<3 x s16>) = G_INSERT %1, %2, 16
1233 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1234 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1235 $vgpr0_vgpr1 = COPY %6
1238 name: test_insert_v4s16_s16_offset0
1241 liveins: $vgpr0_vgpr1, $vgpr2
1243 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset0
1244 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1245 ; CHECK-NEXT: {{ $}}
1246 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1247 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1248 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1249 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1250 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1251 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1252 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1253 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1254 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1255 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1256 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1257 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1258 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST1]](<2 x s16>), [[UV1]](<2 x s16>)
1259 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1260 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1261 %1:_(s32) = COPY $vgpr2
1262 %2:_(s16) = G_TRUNC %1
1263 %3:_(<4 x s16>) = G_INSERT %0, %2, 0
1264 $vgpr0_vgpr1 = COPY %3
1267 name: test_insert_v4s16_s16_offset16
1270 liveins: $vgpr0_vgpr1, $vgpr2
1272 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset16
1273 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1274 ; CHECK-NEXT: {{ $}}
1275 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1276 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1277 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1278 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1279 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1280 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C]]
1281 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1282 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1283 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
1284 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1285 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1286 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST1]](<2 x s16>), [[UV1]](<2 x s16>)
1287 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1288 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1289 %1:_(s32) = COPY $vgpr2
1290 %2:_(s16) = G_TRUNC %1
1291 %3:_(<4 x s16>) = G_INSERT %0, %2, 16
1292 $vgpr0_vgpr1 = COPY %3
1295 name: test_insert_v4s16_s16_offset32
1298 liveins: $vgpr0_vgpr1, $vgpr2
1300 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset32
1301 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1302 ; CHECK-NEXT: {{ $}}
1303 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1304 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1305 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1306 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1307 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1308 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1309 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1310 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1311 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1312 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1313 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1314 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1315 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST1]](<2 x s16>)
1316 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1317 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1318 %1:_(s32) = COPY $vgpr2
1319 %2:_(s16) = G_TRUNC %1
1320 %3:_(<4 x s16>) = G_INSERT %0, %2, 32
1321 $vgpr0_vgpr1 = COPY %3
1324 name: test_insert_v4s16_s16_offset48
1327 liveins: $vgpr0_vgpr1, $vgpr2
1329 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset48
1330 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1331 ; CHECK-NEXT: {{ $}}
1332 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1333 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1334 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1335 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1336 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1337 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C]]
1338 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1339 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1340 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
1341 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1342 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1343 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST1]](<2 x s16>)
1344 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1345 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1346 %1:_(s32) = COPY $vgpr2
1347 %2:_(s16) = G_TRUNC %1
1348 %3:_(<4 x s16>) = G_INSERT %0, %2, 48
1349 $vgpr0_vgpr1 = COPY %3
1352 name: test_insert_v4s16_v2s16_offset0
1355 liveins: $vgpr0_vgpr1, $vgpr2
1357 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset0
1358 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1359 ; CHECK-NEXT: {{ $}}
1360 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1361 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1362 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1363 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1364 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1365 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1366 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1367 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1368 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1369 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1370 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1371 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1372 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST1]](<2 x s16>), [[UV1]](<2 x s16>)
1373 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1374 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1375 %1:_(<2 x s16>) = COPY $vgpr2
1376 %2:_(<4 x s16>) = G_INSERT %0, %1, 0
1377 $vgpr0_vgpr1 = COPY %2
1380 name: test_insert_v4s16_v2s16_offset16
1383 liveins: $vgpr0_vgpr1, $vgpr2
1385 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset16
1386 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1387 ; CHECK-NEXT: {{ $}}
1388 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1389 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1390 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1391 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1392 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1393 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1394 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1395 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1396 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
1397 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1398 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1399 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C1]]
1400 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1401 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1402 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1403 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1404 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1405 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1406 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1407 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1408 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
1409 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1410 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1411 %1:_(<2 x s16>) = COPY $vgpr2
1412 %2:_(<4 x s16>) = G_INSERT %0, %1, 16
1413 $vgpr0_vgpr1 = COPY %2
1416 name: test_insert_v4s16_v2s16_offset32
1419 liveins: $vgpr0_vgpr1, $vgpr2
1421 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset32
1422 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1423 ; CHECK-NEXT: {{ $}}
1424 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1425 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1426 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1427 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY1]](<2 x s16>)
1428 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1429 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1430 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1431 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1432 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1433 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1434 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1435 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1436 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST1]](<2 x s16>)
1437 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1438 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1439 %1:_(<2 x s16>) = COPY $vgpr2
1440 %2:_(<4 x s16>) = G_INSERT %0, %1, 32
1441 $vgpr0_vgpr1 = COPY %2
1444 name: test_insert_v4s16_v3s16_offset0
1447 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1449 ; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset0
1450 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1451 ; CHECK-NEXT: {{ $}}
1452 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1453 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1454 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
1455 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1456 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1457 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1458 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV3]](<2 x s16>)
1459 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1460 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1461 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1462 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1463 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1464 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1465 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1466 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST2]](<2 x s16>)
1467 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1468 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1469 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
1470 %2:_(<3 x s16>) = G_EXTRACT %1, 0
1471 %3:_(<4 x s16>) = G_INSERT %0, %2, 0
1472 $vgpr0_vgpr1 = COPY %3
1475 name: test_insert_v4s16_v3s16_offset16
1478 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1480 ; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset16
1481 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1482 ; CHECK-NEXT: {{ $}}
1483 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1484 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1485 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
1486 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1487 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1488 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
1489 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1490 ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(<2 x s16>), [[UV3:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1491 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV2]](<2 x s16>)
1492 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1493 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C1]]
1494 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1495 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1496 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1497 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1498 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1499 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[BITCAST1]], [[C1]]
1500 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1501 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1502 ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1503 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST3]](<2 x s16>), [[BITCAST4]](<2 x s16>)
1504 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1505 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1506 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
1507 %2:_(<3 x s16>) = G_EXTRACT %1, 0
1508 %3:_(<4 x s16>) = G_INSERT %0, %2, 16
1509 $vgpr0_vgpr1 = COPY %3
1512 name: test_insert_v4s16_s32_offset0
1515 liveins: $vgpr0_vgpr1, $vgpr2
1517 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset0
1518 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1519 ; CHECK-NEXT: {{ $}}
1520 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1521 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1522 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1523 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1524 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1525 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1526 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1527 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1528 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1529 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1530 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1531 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST]](<2 x s16>), [[UV1]](<2 x s16>)
1532 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1533 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1534 %1:_(s32) = COPY $vgpr2
1535 %2:_(<4 x s16>) = G_INSERT %0, %1, 0
1536 $vgpr0_vgpr1 = COPY %2
1539 name: test_insert_v4s16_s32_offset16
1542 liveins: $vgpr0_vgpr1, $vgpr2
1544 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset16
1545 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1546 ; CHECK-NEXT: {{ $}}
1547 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1548 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1549 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1550 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
1551 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1552 ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
1553 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
1554 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1555 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1556 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
1557 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1558 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1559 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1560 ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1561 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[LSHR1]], [[C1]]
1562 ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1563 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
1564 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1565 ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
1566 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[BITCAST2]](<2 x s16>), [[BITCAST3]](<2 x s16>)
1567 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1568 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1569 %1:_(s32) = COPY $vgpr2
1570 %2:_(<4 x s16>) = G_INSERT %0, %1, 16
1571 $vgpr0_vgpr1 = COPY %2
1574 name: test_insert_v4s16_s32_offset32
1577 liveins: $vgpr0_vgpr1, $vgpr2
1579 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset32
1580 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1581 ; CHECK-NEXT: {{ $}}
1582 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1583 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1584 ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
1585 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1586 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY1]], [[C]](s32)
1587 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1588 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1589 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C1]]
1590 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C]](s32)
1591 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1592 ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
1593 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[UV]](<2 x s16>), [[BITCAST]](<2 x s16>)
1594 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
1595 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1596 %1:_(s32) = COPY $vgpr2
1597 %2:_(<4 x s16>) = G_INSERT %0, %1, 32
1598 $vgpr0_vgpr1 = COPY %2
1602 name: test_insert_s64_s16_offset0
1605 liveins: $vgpr0_vgpr1, $vgpr2
1607 ; CHECK-LABEL: name: test_insert_s64_s16_offset0
1608 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1609 ; CHECK-NEXT: {{ $}}
1610 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1611 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1612 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1613 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
1614 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1615 %0:_(s64) = COPY $vgpr0_vgpr1
1616 %1:_(s32) = COPY $vgpr2
1617 %2:_(s16) = G_TRUNC %1
1618 %3:_(s64) = G_INSERT %0, %2, 0
1619 $vgpr0_vgpr1 = COPY %3
1622 name: test_insert_s64_s16_offset16
1625 liveins: $vgpr0_vgpr1, $vgpr2
1627 ; CHECK-LABEL: name: test_insert_s64_s16_offset16
1628 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1629 ; CHECK-NEXT: {{ $}}
1630 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1631 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1632 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1633 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
1634 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1635 %0:_(s64) = COPY $vgpr0_vgpr1
1636 %1:_(s32) = COPY $vgpr2
1637 %2:_(s16) = G_TRUNC %1
1638 %3:_(s64) = G_INSERT %0, %2, 16
1639 $vgpr0_vgpr1 = COPY %3
1642 name: test_insert_s64_s16_offset32
1645 liveins: $vgpr0_vgpr1, $vgpr2
1647 ; CHECK-LABEL: name: test_insert_s64_s16_offset32
1648 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1649 ; CHECK-NEXT: {{ $}}
1650 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1651 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1652 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1653 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
1654 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1655 %0:_(s64) = COPY $vgpr0_vgpr1
1656 %1:_(s32) = COPY $vgpr2
1657 %2:_(s16) = G_TRUNC %1
1658 %3:_(s64) = G_INSERT %0, %2, 32
1659 $vgpr0_vgpr1 = COPY %3
1662 name: test_insert_s64_s16_offset48
1665 liveins: $vgpr0_vgpr1, $vgpr2
1667 ; CHECK-LABEL: name: test_insert_s64_s16_offset48
1668 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2
1669 ; CHECK-NEXT: {{ $}}
1670 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1671 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1672 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1673 ; CHECK-NEXT: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 48
1674 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1675 %0:_(s64) = COPY $vgpr0_vgpr1
1676 %1:_(s32) = COPY $vgpr2
1677 %2:_(s16) = G_TRUNC %1
1678 %3:_(s64) = G_INSERT %0, %2, 48
1679 $vgpr0_vgpr1 = COPY %3
1682 name: test_insert_s32_s16_offset0
1685 liveins: $vgpr0, $vgpr1
1687 ; CHECK-LABEL: name: test_insert_s32_s16_offset0
1688 ; CHECK: liveins: $vgpr0, $vgpr1
1689 ; CHECK-NEXT: {{ $}}
1690 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1691 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1692 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1693 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1694 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65536
1695 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1696 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[AND]]
1697 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
1698 ; CHECK-NEXT: $vgpr0 = COPY [[COPY2]](s32)
1699 %0:_(s32) = COPY $vgpr0
1700 %1:_(s32) = COPY $vgpr1
1701 %2:_(s16) = G_TRUNC %1
1702 %3:_(s32) = G_INSERT %1, %2, 0
1707 name: test_insert_s32_s16_offset1
1710 liveins: $vgpr0, $vgpr1
1712 ; CHECK-LABEL: name: test_insert_s32_s16_offset1
1713 ; CHECK: liveins: $vgpr0, $vgpr1
1714 ; CHECK-NEXT: {{ $}}
1715 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1716 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1717 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1718 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1719 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1720 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1721 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -131071
1722 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
1723 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
1724 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
1725 ; CHECK-NEXT: $vgpr0 = COPY [[COPY2]](s32)
1726 %0:_(s32) = COPY $vgpr0
1727 %1:_(s32) = COPY $vgpr1
1728 %2:_(s16) = G_TRUNC %1
1729 %3:_(s32) = G_INSERT %1, %2, 1
1734 name: test_insert_s32_s16_offset8
1737 liveins: $vgpr0, $vgpr1
1739 ; CHECK-LABEL: name: test_insert_s32_s16_offset8
1740 ; CHECK: liveins: $vgpr0, $vgpr1
1741 ; CHECK-NEXT: {{ $}}
1742 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1743 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1744 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1745 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1746 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1747 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1748 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -16776961
1749 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
1750 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
1751 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
1752 ; CHECK-NEXT: $vgpr0 = COPY [[COPY2]](s32)
1753 %0:_(s32) = COPY $vgpr0
1754 %1:_(s32) = COPY $vgpr1
1755 %2:_(s16) = G_TRUNC %1
1756 %3:_(s32) = G_INSERT %1, %2, 8
1761 name: test_insert_s32_s16_offset16
1764 liveins: $vgpr0, $vgpr1
1766 ; CHECK-LABEL: name: test_insert_s32_s16_offset16
1767 ; CHECK: liveins: $vgpr0, $vgpr1
1768 ; CHECK-NEXT: {{ $}}
1769 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1770 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1771 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1772 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]
1773 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
1774 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1775 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY2]], [[C1]](s32)
1776 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1777 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
1778 ; CHECK-NEXT: $vgpr0 = COPY [[COPY3]](s32)
1779 %0:_(s32) = COPY $vgpr0
1780 %1:_(s32) = COPY $vgpr1
1781 %2:_(s16) = G_TRUNC %1
1782 %3:_(s32) = G_INSERT %1, %2, 16