1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -run-pass=legalizer %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: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
12 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
13 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 0
14 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
15 %0:_(s64) = COPY $vgpr0_vgpr1
16 %1:_(s32) = COPY $vgpr2
17 %2:_(s64) = G_INSERT %0, %1, 0
18 $vgpr0_vgpr1 = COPY %2
21 name: test_insert_s64_s32_offset32
24 liveins: $vgpr0_vgpr1, $vgpr2
26 ; CHECK-LABEL: name: test_insert_s64_s32_offset32
27 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
28 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
29 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 32
30 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
31 %0:_(s64) = COPY $vgpr0_vgpr1
32 %1:_(s32) = COPY $vgpr2
33 %2:_(s64) = G_INSERT %0, %1, 32
34 $vgpr0_vgpr1 = COPY %2
38 name: test_insert_s64_s32_offset16
41 liveins: $vgpr0_vgpr1, $vgpr2
43 ; CHECK-LABEL: name: test_insert_s64_s32_offset16
44 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
45 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
46 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[COPY1]](s32), 16
47 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
48 %0:_(s64) = COPY $vgpr0_vgpr1
49 %1:_(s32) = COPY $vgpr2
50 %2:_(s64) = G_INSERT %0, %1, 16
51 $vgpr0_vgpr1 = COPY %2
55 name: test_insert_s96_s32_offset0
58 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
60 ; CHECK-LABEL: name: test_insert_s96_s32_offset0
61 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
62 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
63 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 0
64 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
65 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
66 %1:_(s32) = COPY $vgpr3
67 %2:_(s96) = G_INSERT %0, %1, 0
68 $vgpr0_vgpr1_vgpr2 = COPY %2
71 name: test_insert_s96_s32_offset32
74 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
76 ; CHECK-LABEL: name: test_insert_s96_s32_offset32
77 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
78 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
79 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 32
80 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
81 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
82 %1:_(s32) = COPY $vgpr3
83 %2:_(s96) = G_INSERT %0, %1, 32
84 $vgpr0_vgpr1_vgpr2 = COPY %2
87 name: test_insert_s96_s32_offset64
90 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
92 ; CHECK-LABEL: name: test_insert_s96_s32_offset64
93 ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
94 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
95 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[COPY]], [[COPY1]](s32), 64
96 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](s96)
97 %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
98 %1:_(s32) = COPY $vgpr3
99 %2:_(s96) = G_INSERT %0, %1, 64
100 $vgpr0_vgpr1_vgpr2 = COPY %2
103 name: test_insert_s128_s32_offset0
106 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
108 ; CHECK-LABEL: name: test_insert_s128_s32_offset0
109 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
110 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
111 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 0
112 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
113 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
114 %1:_(s32) = COPY $vgpr4
115 %2:_(s128) = G_INSERT %0, %1, 0
116 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
119 name: test_insert_s128_s32_offset32
122 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
124 ; CHECK-LABEL: name: test_insert_s128_s32_offset32
125 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
126 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
127 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 32
128 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
129 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
130 %1:_(s32) = COPY $vgpr4
131 %2:_(s128) = G_INSERT %0, %1, 32
132 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
135 name: test_insert_s128_s32_offset64
138 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
140 ; CHECK-LABEL: name: test_insert_s128_s32_offset64
141 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
142 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
143 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 64
144 ; CHECK: $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, 64
148 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
151 name: test_insert_s128_s32_offset96
154 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
156 ; CHECK-LABEL: name: test_insert_s128_s32_offset96
157 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
158 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
159 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s32), 96
160 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
161 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
162 %1:_(s32) = COPY $vgpr4
163 %2:_(s128) = G_INSERT %0, %1, 96
164 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
167 name: test_insert_s128_s64_offset0
170 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
172 ; CHECK-LABEL: name: test_insert_s128_s64_offset0
173 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
174 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
175 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 0
176 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
177 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
178 %1:_(s64) = COPY $vgpr4_vgpr5
179 %2:_(s128) = G_INSERT %0, %1, 0
180 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
183 name: test_insert_s128_s64_offset32
186 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
188 ; CHECK-LABEL: name: test_insert_s128_s64_offset32
189 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
190 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
191 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 32
192 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
193 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
194 %1:_(s64) = COPY $vgpr4_vgpr5
195 %2:_(s128) = G_INSERT %0, %1, 32
196 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
199 name: test_insert_s128_s64_offset64
202 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
204 ; CHECK-LABEL: name: test_insert_s128_s64_offset64
205 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
206 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
207 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s64), 64
208 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
209 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
210 %1:_(s64) = COPY $vgpr4_vgpr5
211 %2:_(s128) = G_INSERT %0, %1, 64
212 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
215 name: test_insert_s128_s96_offset0
218 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
220 ; CHECK-LABEL: name: test_insert_s128_s96_offset0
221 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
222 ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
223 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 0
224 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
225 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
226 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
227 %2:_(s128) = G_INSERT %0, %1, 0
228 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
231 name: test_insert_s128_s96_offset32
234 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
236 ; CHECK-LABEL: name: test_insert_s128_s96_offset32
237 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
238 ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
239 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](s96), 32
240 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
241 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
242 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
243 %2:_(s128) = G_INSERT %0, %1, 32
244 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
247 name: test_insert_p0_s32_offset0
250 liveins: $vgpr0_vgpr1, $vgpr2
252 ; CHECK-LABEL: name: test_insert_p0_s32_offset0
253 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
254 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
255 ; CHECK: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 0
256 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
257 %0:_(p0) = COPY $vgpr0_vgpr1
258 %1:_(s32) = COPY $vgpr2
259 %2:_(p0) = G_INSERT %0, %1, 0
260 $vgpr0_vgpr1 = COPY %2
263 name: test_insert_p0_s32_offset32
266 liveins: $vgpr0_vgpr1, $vgpr2
268 ; CHECK-LABEL: name: test_insert_p0_s32_offset32
269 ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $vgpr0_vgpr1
270 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
271 ; CHECK: [[INSERT:%[0-9]+]]:_(p0) = G_INSERT [[COPY]], [[COPY1]](s32), 32
272 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](p0)
273 %0:_(p0) = COPY $vgpr0_vgpr1
274 %1:_(s32) = COPY $vgpr2
275 %2:_(p0) = G_INSERT %0, %1, 32
276 $vgpr0_vgpr1 = COPY %2
279 name: test_insert_s128_p0_offset0
282 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
284 ; CHECK-LABEL: name: test_insert_s128_p0_offset0
285 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
286 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
287 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 0
288 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
289 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
290 %1:_(p0) = COPY $vgpr4_vgpr5
291 %2:_(s128) = G_INSERT %0, %1, 0
292 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
295 name: test_insert_s128_p0_offset32
298 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
300 ; CHECK-LABEL: name: test_insert_s128_p0_offset32
301 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
302 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
303 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 32
304 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
305 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
306 %1:_(p0) = COPY $vgpr4_vgpr5
307 %2:_(s128) = G_INSERT %0, %1, 32
308 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
311 name: test_insert_s128_p0_offset64
314 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
316 ; CHECK-LABEL: name: test_insert_s128_p0_offset64
317 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
318 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
319 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[COPY1]](p0), 64
320 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
321 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
322 %1:_(p0) = COPY $vgpr4_vgpr5
323 %2:_(s128) = G_INSERT %0, %1, 64
324 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
328 name: test_insert_s128_s16_offset0
331 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
333 ; CHECK-LABEL: name: test_insert_s128_s16_offset0
334 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
335 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
336 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
337 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
338 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
339 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
340 %1:_(s32) = COPY $vgpr4
341 %2:_(s16) = G_TRUNC %1
342 %3:_(s128) = G_INSERT %0, %2, 0
343 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
347 name: test_insert_s128_s16_offset16
350 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
352 ; CHECK-LABEL: name: test_insert_s128_s16_offset16
353 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
354 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
355 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
356 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
357 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
358 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
359 %1:_(s32) = COPY $vgpr4
360 %2:_(s16) = G_TRUNC %1
361 %3:_(s128) = G_INSERT %0, %2, 16
362 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
366 name: test_insert_s128_s16_offset32
369 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
371 ; CHECK-LABEL: name: test_insert_s128_s16_offset32
372 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
373 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
374 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
375 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
376 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
377 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
378 %1:_(s32) = COPY $vgpr4
379 %2:_(s16) = G_TRUNC %1
380 %3:_(s128) = G_INSERT %0, %2, 32
381 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
385 name: test_insert_s128_s16_offset112
388 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
390 ; CHECK-LABEL: name: test_insert_s128_s16_offset112
391 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
392 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
393 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
394 ; CHECK: [[INSERT:%[0-9]+]]:_(s128) = G_INSERT [[COPY]], [[TRUNC]](s16), 112
395 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](s128)
396 %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
397 %1:_(s32) = COPY $vgpr4
398 %2:_(s16) = G_TRUNC %1
399 %3:_(s128) = G_INSERT %0, %2, 112
400 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
404 name: test_insert_v2s32_s32_offset0
407 liveins: $vgpr0_vgpr1, $vgpr2
409 ; CHECK-LABEL: name: test_insert_v2s32_s32_offset0
410 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
411 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
412 ; CHECK: [[INSERT:%[0-9]+]]:_(<2 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
413 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<2 x s32>)
414 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
415 %1:_(s32) = COPY $vgpr2
416 %2:_(<2 x s32>) = G_INSERT %0, %1, 0
417 $vgpr0_vgpr1 = COPY %2
420 name: test_insert_v2s32_s32_offset32
423 liveins: $vgpr0_vgpr1, $vgpr2
425 ; CHECK-LABEL: name: test_insert_v2s32_s32_offset32
426 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
427 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
428 ; CHECK: [[INSERT:%[0-9]+]]:_(<2 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
429 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<2 x s32>)
430 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
431 %1:_(s32) = COPY $vgpr2
432 %2:_(<2 x s32>) = G_INSERT %0, %1, 32
433 $vgpr0_vgpr1 = COPY %2
436 name: test_insert_v3s32_s32_offset0
439 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
441 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset0
442 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
443 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
444 ; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
445 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
446 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
447 %1:_(s32) = COPY $vgpr3
448 %2:_(<3 x s32>) = G_INSERT %0, %1, 0
449 $vgpr0_vgpr1_vgpr2 = COPY %2
452 name: test_insert_v3s32_s32_offset32
455 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
457 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset32
458 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
459 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
460 ; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
461 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
462 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
463 %1:_(s32) = COPY $vgpr3
464 %2:_(<3 x s32>) = G_INSERT %0, %1, 32
465 $vgpr0_vgpr1_vgpr2 = COPY %2
468 name: test_insert_v3s32_s32_offset64
471 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3
473 ; CHECK-LABEL: name: test_insert_v3s32_s32_offset64
474 ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
475 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr3
476 ; CHECK: [[INSERT:%[0-9]+]]:_(<3 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 64
477 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT]](<3 x s32>)
478 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
479 %1:_(s32) = COPY $vgpr3
480 %2:_(<3 x s32>) = G_INSERT %0, %1, 64
481 $vgpr0_vgpr1_vgpr2 = COPY %2
484 name: test_insert_v4s32_s32_offset0
487 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
489 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset0
490 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
491 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
492 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
493 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
494 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
495 %1:_(s32) = COPY $vgpr4
496 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
497 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
500 name: test_insert_v4s32_s32_offset32
503 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
505 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset32
506 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
507 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
508 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
509 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
510 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
511 %1:_(s32) = COPY $vgpr4
512 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
513 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
516 name: test_insert_v4s32_s32_offset64
519 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
521 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset64
522 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
523 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
524 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 64
525 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
526 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
527 %1:_(s32) = COPY $vgpr4
528 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
529 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
532 name: test_insert_v4s32_s32_offset96
535 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4
537 ; CHECK-LABEL: name: test_insert_v4s32_s32_offset96
538 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
539 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr4
540 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s32), 96
541 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
542 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
543 %1:_(s32) = COPY $vgpr4
544 %2:_(<4 x s32>) = G_INSERT %0, %1, 96
545 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
548 name: test_insert_v4s32_s64_offset0
551 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
553 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset0
554 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
555 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
556 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 0
557 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
558 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
559 %1:_(s64) = COPY $vgpr4_vgpr5
560 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
561 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
564 name: test_insert_v4s32_s64_offset32
567 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
569 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset32
570 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
571 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
572 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 32
573 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
574 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
575 %1:_(s64) = COPY $vgpr4_vgpr5
576 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
577 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
580 name: test_insert_v4s32_s64_offset64
583 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
585 ; CHECK-LABEL: name: test_insert_v4s32_s64_offset64
586 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
587 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5
588 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s64), 64
589 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
590 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
591 %1:_(s64) = COPY $vgpr4_vgpr5
592 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
593 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
596 name: test_insert_v4s32_s96_offset0
599 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
601 ; CHECK-LABEL: name: test_insert_v4s32_s96_offset0
602 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
603 ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
604 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s96), 0
605 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
606 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
607 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
608 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
609 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
612 name: test_insert_v4s32_s96_offset32
615 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
617 ; CHECK-LABEL: name: test_insert_v4s32_s96_offset32
618 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
619 ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr4_vgpr5_vgpr6
620 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](s96), 32
621 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
622 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
623 %1:_(s96) = COPY $vgpr4_vgpr5_vgpr6
624 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
625 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
628 name: test_insert_v4s32_v2s32_offset0
631 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
633 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset0
634 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
635 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
636 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 0
637 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
638 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
639 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
640 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
641 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
644 name: test_insert_v4s32_v2s32_offset32
647 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
649 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset32
650 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
651 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
652 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 32
653 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
654 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
655 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
656 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
657 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
660 name: test_insert_v4s32_v2s32_offset64
663 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
665 ; CHECK-LABEL: name: test_insert_v4s32_v2s32_offset64
666 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
667 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
668 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<2 x s32>), 64
669 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
670 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
671 %1:_(<2 x s32>) = COPY $vgpr4_vgpr5
672 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
673 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
676 name: test_insert_v4s32_v3s32_offset0
679 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
681 ; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset0
682 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
683 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
684 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<3 x s32>), 0
685 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
686 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
687 %1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
688 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
689 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
692 name: test_insert_v4s32_v3s32_offset32
695 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6
697 ; CHECK-LABEL: name: test_insert_v4s32_v3s32_offset32
698 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
699 ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
700 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](<3 x s32>), 32
701 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
702 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
703 %1:_(<3 x s32>) = COPY $vgpr4_vgpr5_vgpr6
704 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
705 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
708 name: test_insert_v4s32_p0_offset0
711 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
713 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset0
714 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
715 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
716 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 0
717 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
718 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
719 %1:_(p0) = COPY $vgpr4_vgpr5
720 %2:_(<4 x s32>) = G_INSERT %0, %1, 0
721 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
724 name: test_insert_v4s32_p0_offset32
727 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
729 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset32
730 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
731 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
732 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 32
733 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
734 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
735 %1:_(p0) = COPY $vgpr4_vgpr5
736 %2:_(<4 x s32>) = G_INSERT %0, %1, 32
737 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
740 name: test_insert_v4s32_p0_offset64
743 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5
745 ; CHECK-LABEL: name: test_insert_v4s32_p0_offset64
746 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
747 ; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY $vgpr4_vgpr5
748 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s32>) = G_INSERT [[COPY]], [[COPY1]](p0), 64
749 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT]](<4 x s32>)
750 %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
751 %1:_(p0) = COPY $vgpr4_vgpr5
752 %2:_(<4 x s32>) = G_INSERT %0, %1, 64
753 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
757 name: test_insert_v2s16_s16_offset0
760 liveins: $vgpr0, $vgpr1
762 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset0
763 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
764 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
765 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
766 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
767 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
768 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
769 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65536
770 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C1]]
771 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[AND]]
772 ; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
773 ; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
774 %0:_(<2 x s16>) = COPY $vgpr0
775 %1:_(s32) = COPY $vgpr1
776 %2:_(s16) = G_TRUNC %1
777 %3:_(<2 x s16>) = G_INSERT %0, %2, 0
782 name: test_insert_v2s16_s16_offset1
785 liveins: $vgpr0, $vgpr1
787 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset1
788 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
789 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
790 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
791 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
792 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
793 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
794 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
795 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
796 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65535
797 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C2]]
798 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
799 ; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
800 ; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
801 %0:_(<2 x s16>) = COPY $vgpr0
802 %1:_(s32) = COPY $vgpr1
803 %2:_(s16) = G_TRUNC %1
804 %3:_(<2 x s16>) = G_INSERT %0, %2, 1
808 name: test_insert_v2s16_s16_offset16
811 liveins: $vgpr0, $vgpr1
813 ; CHECK-LABEL: name: test_insert_v2s16_s16_offset16
814 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
815 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
816 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
817 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
818 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
819 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
820 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
821 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
822 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
823 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C2]]
824 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
825 ; CHECK: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
826 ; CHECK: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
827 %0:_(<2 x s16>) = COPY $vgpr0
828 %1:_(s32) = COPY $vgpr1
829 %2:_(s16) = G_TRUNC %1
830 %3:_(<2 x s16>) = G_INSERT %0, %2, 16
834 name: test_insert_v3s16_s16_offset0
837 liveins: $vgpr0_vgpr1, $vgpr2
839 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset0
840 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
841 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
842 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
843 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
844 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
845 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
846 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 0
847 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
848 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
849 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
850 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
851 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
852 %1:_(<3 x s16>) = G_EXTRACT %0, 0
853 %2:_(s32) = COPY $vgpr2
854 %3:_(s16) = G_TRUNC %2
855 %4:_(<3 x s16>) = G_INSERT %1, %3, 0
856 %5:_(<4 x s16>) = G_IMPLICIT_DEF
857 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
858 $vgpr0_vgpr1 = COPY %6
861 name: test_insert_v3s16_s16_offset16
864 liveins: $vgpr0_vgpr1, $vgpr2
866 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset16
867 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
868 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
869 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
870 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
871 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
872 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
873 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 16
874 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
875 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
876 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
877 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
878 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
879 %1:_(<3 x s16>) = G_EXTRACT %0, 0
880 %2:_(s32) = COPY $vgpr2
881 %3:_(s16) = G_TRUNC %2
882 %4:_(<3 x s16>) = G_INSERT %1, %3, 16
883 %5:_(<4 x s16>) = G_IMPLICIT_DEF
884 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
885 $vgpr0_vgpr1 = COPY %6
888 name: test_insert_v3s16_s16_offset32
891 liveins: $vgpr0_vgpr1, $vgpr2
893 ; CHECK-LABEL: name: test_insert_v3s16_s16_offset32
894 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
895 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
896 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
897 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
898 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
899 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
900 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[TRUNC]](s16), 32
901 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
902 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
903 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
904 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
905 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
906 %1:_(<3 x s16>) = G_EXTRACT %0, 0
907 %2:_(s32) = COPY $vgpr2
908 %3:_(s16) = G_TRUNC %2
909 %4:_(<3 x s16>) = G_INSERT %1, %3, 32
910 %5:_(<4 x s16>) = G_IMPLICIT_DEF
911 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
912 $vgpr0_vgpr1 = COPY %6
915 name: test_insert_v3s16_v2s16_offset0
918 liveins: $vgpr0_vgpr1, $vgpr2
920 ; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset0
921 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
922 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
923 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
924 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
925 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
926 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](<2 x s16>), 0
927 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
928 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
929 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
930 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
931 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
932 %1:_(<3 x s16>) = G_EXTRACT %0, 0
933 %2:_(<2 x s16>) = COPY $vgpr2
934 %4:_(<3 x s16>) = G_INSERT %1, %2, 0
935 %5:_(<4 x s16>) = G_IMPLICIT_DEF
936 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
937 $vgpr0_vgpr1 = COPY %6
940 name: test_insert_v3s16_v2s16_offset16
943 liveins: $vgpr0_vgpr1, $vgpr2
945 ; CHECK-LABEL: name: test_insert_v3s16_v2s16_offset16
946 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
947 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
948 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
949 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
950 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
951 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](<2 x s16>), 16
952 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
953 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
954 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
955 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
956 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
957 %1:_(<3 x s16>) = G_EXTRACT %0, 0
958 %2:_(<2 x s16>) = COPY $vgpr2
959 %4:_(<3 x s16>) = G_INSERT %1, %2, 16
960 %5:_(<4 x s16>) = G_IMPLICIT_DEF
961 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
962 $vgpr0_vgpr1 = COPY %6
965 name: test_insert_v3s16_s32_offset0
968 liveins: $vgpr0_vgpr1, $vgpr2
970 ; CHECK-LABEL: name: test_insert_v3s16_s32_offset0
971 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
972 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
973 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
974 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
975 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
976 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](s32), 0
977 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
978 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
979 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
980 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
981 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
982 %1:_(<3 x s16>) = G_EXTRACT %0, 0
983 %2:_(s32) = COPY $vgpr2
984 %4:_(<3 x s16>) = G_INSERT %1, %2, 0
985 %5:_(<4 x s16>) = G_IMPLICIT_DEF
986 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
987 $vgpr0_vgpr1 = COPY %6
990 name: test_insert_v3s16_s32_offset16
993 liveins: $vgpr0_vgpr1, $vgpr2
995 ; CHECK-LABEL: name: test_insert_v3s16_s32_offset16
996 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
997 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY]](<4 x s16>), 0
998 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
999 ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1000 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[EXTRACT]](<3 x s16>), 0
1001 ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT]], [[COPY1]](s32), 16
1002 ; CHECK: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT1]](<4 x s16>), 0
1003 ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
1004 ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF1]], [[EXTRACT1]](<3 x s16>), 0
1005 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT2]](<4 x s16>)
1006 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1007 %1:_(<3 x s16>) = G_EXTRACT %0, 0
1008 %2:_(s32) = COPY $vgpr2
1009 %4:_(<3 x s16>) = G_INSERT %1, %2, 16
1010 %5:_(<4 x s16>) = G_IMPLICIT_DEF
1011 %6:_(<4 x s16>) = G_INSERT %5, %4, 0
1012 $vgpr0_vgpr1 = COPY %6
1015 name: test_insert_v4s16_s16_offset0
1018 liveins: $vgpr0_vgpr1, $vgpr2
1020 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset0
1021 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1022 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1023 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1024 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
1025 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1026 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1027 %1:_(s32) = COPY $vgpr2
1028 %2:_(s16) = G_TRUNC %1
1029 %3:_(<4 x s16>) = G_INSERT %0, %2, 0
1030 $vgpr0_vgpr1 = COPY %3
1033 name: test_insert_v4s16_s16_offset16
1036 liveins: $vgpr0_vgpr1, $vgpr2
1038 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset16
1039 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1040 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1041 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1042 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
1043 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1044 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1045 %1:_(s32) = COPY $vgpr2
1046 %2:_(s16) = G_TRUNC %1
1047 %3:_(<4 x s16>) = G_INSERT %0, %2, 16
1048 $vgpr0_vgpr1 = COPY %3
1051 name: test_insert_v4s16_s16_offset32
1054 liveins: $vgpr0_vgpr1, $vgpr2
1056 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset32
1057 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1058 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1059 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1060 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
1061 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1062 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1063 %1:_(s32) = COPY $vgpr2
1064 %2:_(s16) = G_TRUNC %1
1065 %3:_(<4 x s16>) = G_INSERT %0, %2, 32
1066 $vgpr0_vgpr1 = COPY %3
1069 name: test_insert_v4s16_s16_offset48
1072 liveins: $vgpr0_vgpr1, $vgpr2
1074 ; CHECK-LABEL: name: test_insert_v4s16_s16_offset48
1075 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1076 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1077 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1078 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[TRUNC]](s16), 48
1079 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1080 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1081 %1:_(s32) = COPY $vgpr2
1082 %2:_(s16) = G_TRUNC %1
1083 %3:_(<4 x s16>) = G_INSERT %0, %2, 48
1084 $vgpr0_vgpr1 = COPY %3
1087 name: test_insert_v4s16_v2s16_offset0
1090 liveins: $vgpr0_vgpr1, $vgpr2
1092 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset0
1093 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1094 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1095 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 0
1096 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1097 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1098 %1:_(<2 x s16>) = COPY $vgpr2
1099 %2:_(<4 x s16>) = G_INSERT %0, %1, 0
1100 $vgpr0_vgpr1 = COPY %2
1103 name: test_insert_v4s16_v2s16_offset16
1106 liveins: $vgpr0_vgpr1, $vgpr2
1108 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset16
1109 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1110 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1111 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 16
1112 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1113 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1114 %1:_(<2 x s16>) = COPY $vgpr2
1115 %2:_(<4 x s16>) = G_INSERT %0, %1, 16
1116 $vgpr0_vgpr1 = COPY %2
1119 name: test_insert_v4s16_v2s16_offset32
1122 liveins: $vgpr0_vgpr1, $vgpr2
1124 ; CHECK-LABEL: name: test_insert_v4s16_v2s16_offset32
1125 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1126 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr2
1127 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](<2 x s16>), 32
1128 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1129 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1130 %1:_(<2 x s16>) = COPY $vgpr2
1131 %2:_(<4 x s16>) = G_INSERT %0, %1, 32
1132 $vgpr0_vgpr1 = COPY %2
1135 name: test_insert_v4s16_v3s16_offset0
1138 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1140 ; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset0
1141 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1142 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1143 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY1]](<4 x s16>), 0
1144 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[EXTRACT]](<3 x s16>), 0
1145 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1146 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1147 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
1148 %2:_(<3 x s16>) = G_EXTRACT %1, 0
1149 %3:_(<4 x s16>) = G_INSERT %0, %2, 0
1150 $vgpr0_vgpr1 = COPY %3
1153 name: test_insert_v4s16_v3s16_offset16
1156 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
1158 ; CHECK-LABEL: name: test_insert_v4s16_v3s16_offset16
1159 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1160 ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
1161 ; CHECK: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[COPY1]](<4 x s16>), 0
1162 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[EXTRACT]](<3 x s16>), 16
1163 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1164 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1165 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
1166 %2:_(<3 x s16>) = G_EXTRACT %1, 0
1167 %3:_(<4 x s16>) = G_INSERT %0, %2, 16
1168 $vgpr0_vgpr1 = COPY %3
1171 name: test_insert_v4s16_s32_offset0
1174 liveins: $vgpr0_vgpr1, $vgpr2
1176 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset0
1177 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1178 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1179 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 0
1180 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1181 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1182 %1:_(s32) = COPY $vgpr2
1183 %2:_(<4 x s16>) = G_INSERT %0, %1, 0
1184 $vgpr0_vgpr1 = COPY %2
1187 name: test_insert_v4s16_s32_offset16
1190 liveins: $vgpr0_vgpr1, $vgpr2
1192 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset16
1193 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1194 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1195 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 16
1196 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1197 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1198 %1:_(s32) = COPY $vgpr2
1199 %2:_(<4 x s16>) = G_INSERT %0, %1, 16
1200 $vgpr0_vgpr1 = COPY %2
1203 name: test_insert_v4s16_s32_offset32
1206 liveins: $vgpr0_vgpr1, $vgpr2
1208 ; CHECK-LABEL: name: test_insert_v4s16_s32_offset32
1209 ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
1210 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1211 ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[COPY]], [[COPY1]](s32), 32
1212 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](<4 x s16>)
1213 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
1214 %1:_(s32) = COPY $vgpr2
1215 %2:_(<4 x s16>) = G_INSERT %0, %1, 32
1216 $vgpr0_vgpr1 = COPY %2
1220 name: test_insert_s64_s16_offset0
1223 liveins: $vgpr0_vgpr1, $vgpr2
1225 ; CHECK-LABEL: name: test_insert_s64_s16_offset0
1226 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1227 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1228 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1229 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 0
1230 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1231 %0:_(s64) = COPY $vgpr0_vgpr1
1232 %1:_(s32) = COPY $vgpr2
1233 %2:_(s16) = G_TRUNC %1
1234 %3:_(s64) = G_INSERT %0, %2, 0
1235 $vgpr0_vgpr1 = COPY %3
1238 name: test_insert_s64_s16_offset16
1241 liveins: $vgpr0_vgpr1, $vgpr2
1243 ; CHECK-LABEL: name: test_insert_s64_s16_offset16
1244 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1245 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1246 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1247 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 16
1248 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1249 %0:_(s64) = COPY $vgpr0_vgpr1
1250 %1:_(s32) = COPY $vgpr2
1251 %2:_(s16) = G_TRUNC %1
1252 %3:_(s64) = G_INSERT %0, %2, 16
1253 $vgpr0_vgpr1 = COPY %3
1256 name: test_insert_s64_s16_offset32
1259 liveins: $vgpr0_vgpr1, $vgpr2
1261 ; CHECK-LABEL: name: test_insert_s64_s16_offset32
1262 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1263 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1264 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1265 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 32
1266 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1267 %0:_(s64) = COPY $vgpr0_vgpr1
1268 %1:_(s32) = COPY $vgpr2
1269 %2:_(s16) = G_TRUNC %1
1270 %3:_(s64) = G_INSERT %0, %2, 32
1271 $vgpr0_vgpr1 = COPY %3
1274 name: test_insert_s64_s16_offset48
1277 liveins: $vgpr0_vgpr1, $vgpr2
1279 ; CHECK-LABEL: name: test_insert_s64_s16_offset48
1280 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
1281 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr2
1282 ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
1283 ; CHECK: [[INSERT:%[0-9]+]]:_(s64) = G_INSERT [[COPY]], [[TRUNC]](s16), 48
1284 ; CHECK: $vgpr0_vgpr1 = COPY [[INSERT]](s64)
1285 %0:_(s64) = COPY $vgpr0_vgpr1
1286 %1:_(s32) = COPY $vgpr2
1287 %2:_(s16) = G_TRUNC %1
1288 %3:_(s64) = G_INSERT %0, %2, 48
1289 $vgpr0_vgpr1 = COPY %3
1292 name: test_insert_s32_s16_offset0
1295 liveins: $vgpr0, $vgpr1
1297 ; CHECK-LABEL: name: test_insert_s32_s16_offset0
1298 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1299 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1300 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1301 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1302 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
1303 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65536
1304 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
1305 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[AND]]
1306 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[OR]](s32)
1307 ; CHECK: $vgpr0 = COPY [[BITCAST]](s32)
1308 %0:_(s32) = COPY $vgpr0
1309 %1:_(s32) = COPY $vgpr1
1310 %2:_(s16) = G_TRUNC %1
1311 %3:_(s32) = G_INSERT %1, %2, 0
1316 name: test_insert_s32_s16_offset1
1319 liveins: $vgpr0, $vgpr1
1321 ; CHECK-LABEL: name: test_insert_s32_s16_offset1
1322 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1323 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1324 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1325 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1326 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
1327 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1328 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1329 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65535
1330 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
1331 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
1332 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[OR]](s32)
1333 ; CHECK: $vgpr0 = COPY [[BITCAST]](s32)
1334 %0:_(s32) = COPY $vgpr0
1335 %1:_(s32) = COPY $vgpr1
1336 %2:_(s16) = G_TRUNC %1
1337 %3:_(s32) = G_INSERT %1, %2, 1
1342 name: test_insert_s32_s16_offset8
1345 liveins: $vgpr0, $vgpr1
1347 ; CHECK-LABEL: name: test_insert_s32_s16_offset8
1348 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1349 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1350 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1351 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1352 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
1353 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
1354 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1355 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -65281
1356 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
1357 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
1358 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[OR]](s32)
1359 ; CHECK: $vgpr0 = COPY [[BITCAST]](s32)
1360 %0:_(s32) = COPY $vgpr0
1361 %1:_(s32) = COPY $vgpr1
1362 %2:_(s16) = G_TRUNC %1
1363 %3:_(s32) = G_INSERT %1, %2, 8
1368 name: test_insert_s32_s16_offset16
1371 liveins: $vgpr0, $vgpr1
1373 ; CHECK-LABEL: name: test_insert_s32_s16_offset16
1374 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1375 ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1376 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1377 ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1378 ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
1379 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1380 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s32)
1381 ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 -1
1382 ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C2]]
1383 ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
1384 ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[OR]](s32)
1385 ; CHECK: $vgpr0 = COPY [[BITCAST]](s32)
1386 %0:_(s32) = COPY $vgpr0
1387 %1:_(s32) = COPY $vgpr1
1388 %2:_(s16) = G_TRUNC %1
1389 %3:_(s32) = G_INSERT %1, %2, 16