1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
12 ; CHECK-LABEL: name: insert_s512_s32
13 ; CHECK: [[DEF:%[0-9]+]]:sreg_512 = IMPLICIT_DEF
14 ; CHECK: [[DEF1:%[0-9]+]]:sreg_32 = IMPLICIT_DEF
15 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[DEF]], [[DEF1]], %subreg.sub0
16 ; CHECK: [[INSERT_SUBREG1:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG]], [[DEF1]], %subreg.sub1
17 ; CHECK: [[INSERT_SUBREG2:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG1]], [[DEF1]], %subreg.sub2
18 ; CHECK: [[INSERT_SUBREG3:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG2]], [[DEF1]], %subreg.sub3
19 ; CHECK: [[INSERT_SUBREG4:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG3]], [[DEF1]], %subreg.sub4
20 ; CHECK: [[INSERT_SUBREG5:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG4]], [[DEF1]], %subreg.sub5
21 ; CHECK: [[INSERT_SUBREG6:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG5]], [[DEF1]], %subreg.sub6
22 ; CHECK: [[INSERT_SUBREG7:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG6]], [[DEF1]], %subreg.sub7
23 ; CHECK: [[INSERT_SUBREG8:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG7]], [[DEF1]], %subreg.sub8
24 ; CHECK: [[INSERT_SUBREG9:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG8]], [[DEF1]], %subreg.sub9
25 ; CHECK: [[INSERT_SUBREG10:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG9]], [[DEF1]], %subreg.sub10
26 ; CHECK: [[INSERT_SUBREG11:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG10]], [[DEF1]], %subreg.sub11
27 ; CHECK: [[INSERT_SUBREG12:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG11]], [[DEF1]], %subreg.sub12
28 ; CHECK: [[INSERT_SUBREG13:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG12]], [[DEF1]], %subreg.sub13
29 ; CHECK: [[INSERT_SUBREG14:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG13]], [[DEF1]], %subreg.sub14
30 ; CHECK: [[INSERT_SUBREG15:%[0-9]+]]:sreg_512 = INSERT_SUBREG [[INSERT_SUBREG14]], [[DEF1]], %subreg.sub15
31 ; CHECK: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[INSERT_SUBREG15]]
32 ; CHECK: SI_RETURN_TO_EPILOG $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
33 %0:sgpr(s512) = G_IMPLICIT_DEF
34 %1:sgpr(s32) = G_IMPLICIT_DEF
35 %2:sgpr(s512) = G_INSERT %0:sgpr, %1:sgpr(s32), 0
36 %3:sgpr(s512) = G_INSERT %2:sgpr, %1:sgpr(s32), 32
37 %4:sgpr(s512) = G_INSERT %3:sgpr, %1:sgpr(s32), 64
38 %5:sgpr(s512) = G_INSERT %4:sgpr, %1:sgpr(s32), 96
39 %6:sgpr(s512) = G_INSERT %5:sgpr, %1:sgpr(s32), 128
40 %7:sgpr(s512) = G_INSERT %6:sgpr, %1:sgpr(s32), 160
41 %8:sgpr(s512) = G_INSERT %7:sgpr, %1:sgpr(s32), 192
42 %9:sgpr(s512) = G_INSERT %8:sgpr, %1:sgpr(s32), 224
43 %10:sgpr(s512) = G_INSERT %9:sgpr, %1:sgpr(s32), 256
44 %11:sgpr(s512) = G_INSERT %10:sgpr, %1:sgpr(s32), 288
45 %12:sgpr(s512) = G_INSERT %11:sgpr, %1:sgpr(s32), 320
46 %13:sgpr(s512) = G_INSERT %12:sgpr, %1:sgpr(s32), 352
47 %14:sgpr(s512) = G_INSERT %13:sgpr, %1:sgpr(s32), 384
48 %15:sgpr(s512) = G_INSERT %14:sgpr, %1:sgpr(s32), 416
49 %16:sgpr(s512) = G_INSERT %15:sgpr, %1:sgpr(s32), 448
50 %17:sgpr(s512) = G_INSERT %16:sgpr, %1:sgpr(s32), 480
51 $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %17:sgpr(s512)
52 SI_RETURN_TO_EPILOG $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
56 name: insert_v_s64_v_s32_0
62 liveins: $vgpr0_vgpr1, $vgpr2
63 %0:vgpr(s64) = COPY $vgpr0_vgpr1
64 %1:vgpr(s32) = COPY $vgpr2
65 %2:vgpr(s64) = G_INSERT %0, %1, 0
66 S_ENDPGM 0, implicit %2
71 name: insert_v_s64_v_s32_32
77 liveins: $vgpr0_vgpr1, $vgpr2
78 ; CHECK-LABEL: name: insert_v_s64_v_s32_32
79 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
80 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
81 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_64 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1
82 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
83 %0:vgpr(s64) = COPY $vgpr0_vgpr1
84 %1:vgpr(s32) = COPY $vgpr2
85 %2:vgpr(s64) = G_INSERT %0, %1, 32
86 S_ENDPGM 0, implicit %2
91 name: insert_s_s64_s_s32_0
97 liveins: $sgpr0_sgpr1, $sgpr2
98 ; CHECK-LABEL: name: insert_s_s64_s_s32_0
99 ; CHECK: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
100 ; CHECK: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
101 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_64_xexec = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0
102 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
103 %0:sgpr(s64) = COPY $sgpr0_sgpr1
104 %1:sgpr(s32) = COPY $sgpr2
105 %2:sgpr(s64) = G_INSERT %0, %1, 0
106 S_ENDPGM 0, implicit %2
111 name: insert_s_s64_s_s32_32
113 regBankSelected: true
117 liveins: $sgpr0_sgpr1, $sgpr2
118 ; CHECK-LABEL: name: insert_s_s64_s_s32_32
119 ; CHECK: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
120 ; CHECK: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr2
121 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_64_xexec = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1
122 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
123 %0:sgpr(s64) = COPY $sgpr0_sgpr1
124 %1:sgpr(s32) = COPY $sgpr2
125 %2:sgpr(s64) = G_INSERT %0, %1, 32
126 S_ENDPGM 0, implicit %2
131 name: insert_s_s64_v_s32_32
133 regBankSelected: true
137 liveins: $sgpr0_sgpr1, $vgpr0
138 ; CHECK-LABEL: name: insert_s_s64_v_s32_32
139 ; CHECK: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
140 ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
141 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_64 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1
142 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
143 %0:sgpr(s64) = COPY $sgpr0_sgpr1
144 %1:vgpr(s32) = COPY $vgpr2
145 %2:vgpr(s64) = G_INSERT %0, %1, 32
146 S_ENDPGM 0, implicit %2
151 name: insert_v_s64_s_s32_32
153 regBankSelected: true
157 liveins: $vgpr0_vgpr1, $sgpr0
158 ; CHECK-LABEL: name: insert_v_s64_s_s32_32
159 ; CHECK: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
160 ; CHECK: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
161 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_64 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1
162 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
163 %0:vgpr(s64) = COPY $vgpr0_vgpr1
164 %1:sgpr(s32) = COPY $sgpr0
165 %2:vgpr(s64) = G_INSERT %0, %1, 32
166 S_ENDPGM 0, implicit %2
171 name: insert_v_s96_v_s64_0
173 regBankSelected: true
177 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4
178 ; CHECK-LABEL: name: insert_v_s96_v_s64_0
179 ; CHECK: [[COPY:%[0-9]+]]:vreg_96 = COPY $vgpr0_vgpr1_vgpr2
180 ; CHECK: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr4
181 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_96 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1
182 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
183 %0:vgpr(s96) = COPY $vgpr0_vgpr1_vgpr2
184 %1:vgpr(s64) = COPY $vgpr3_vgpr4
185 %2:vgpr(s96) = G_INSERT %0, %1, 0
186 S_ENDPGM 0, implicit %2
191 name: insert_v_s96_v_s64_32
193 regBankSelected: true
197 liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4
198 ; CHECK-LABEL: name: insert_v_s96_v_s64_32
199 ; CHECK: [[COPY:%[0-9]+]]:vreg_96 = COPY $vgpr0_vgpr1_vgpr2
200 ; CHECK: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr3_vgpr4
201 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_96 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1_sub2
202 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
203 %0:vgpr(s96) = COPY $vgpr0_vgpr1_vgpr2
204 %1:vgpr(s64) = COPY $vgpr3_vgpr4
205 %2:vgpr(s96) = G_INSERT %0, %1, 32
206 S_ENDPGM 0, implicit %2
211 name: insert_s_s96_s_s64_0
213 regBankSelected: true
217 liveins: $sgpr0_sgpr1_sgpr2, $sgpr4_sgpr5
218 ; CHECK-LABEL: name: insert_s_s96_s_s64_0
219 ; CHECK: [[COPY:%[0-9]+]]:sgpr_96_with_sub0_sub1 = COPY $sgpr0_sgpr1_sgpr2
220 ; CHECK: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
221 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_96 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1
222 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
223 %0:sgpr(s96) = COPY $sgpr0_sgpr1_sgpr2
224 %1:sgpr(s64) = COPY $sgpr4_sgpr5
225 %2:sgpr(s96) = G_INSERT %0, %1, 0
226 S_ENDPGM 0, implicit %2
231 name: insert_s_s96_s_s64_32
233 regBankSelected: true
237 liveins: $sgpr0_sgpr1_sgpr2, $sgpr4_sgpr5
238 ; CHECK-LABEL: name: insert_s_s96_s_s64_32
239 ; CHECK: [[COPY:%[0-9]+]]:sgpr_96_with_sub1_sub2 = COPY $sgpr0_sgpr1_sgpr2
240 ; CHECK: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
241 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_96 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1_sub2
242 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
243 %0:sgpr(s96) = COPY $sgpr0_sgpr1_sgpr2
244 %1:sgpr(s64) = COPY $sgpr4_sgpr5
245 %2:sgpr(s96) = G_INSERT %0, %1, 32
246 S_ENDPGM 0, implicit %2
251 name: insert_s_s128_s_s64_0
253 regBankSelected: true
257 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5
258 ; CHECK-LABEL: name: insert_s_s128_s_s64_0
259 ; CHECK: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
260 ; CHECK: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
261 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sgpr_128 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1
262 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
263 %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
264 %1:sgpr(s64) = COPY $sgpr4_sgpr5
265 %2:sgpr(s128) = G_INSERT %0, %1, 0
266 S_ENDPGM 0, implicit %2
271 # name: insert_s_s128_s_s64_32
273 # regBankSelected: true
277 # liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5
278 # %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
279 # %1:sgpr(s64) = COPY $sgpr4_sgpr5
280 # %2:sgpr(s128) = G_INSERT %0, %1, 32
281 # S_ENDPGM 0, implicit %2
286 name: insert_s_s128_s_s64_64
288 regBankSelected: true
292 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5
293 ; CHECK-LABEL: name: insert_s_s128_s_s64_64
294 ; CHECK: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
295 ; CHECK: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
296 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sgpr_128 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub2_sub3
297 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
298 %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
299 %1:sgpr(s64) = COPY $sgpr4_sgpr5
300 %2:sgpr(s128) = G_INSERT %0, %1, 64
301 S_ENDPGM 0, implicit %2
306 name: insert_s_v256_v_s64_96
308 regBankSelected: true
312 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9
313 ; CHECK-LABEL: name: insert_s_v256_v_s64_96
314 ; CHECK: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
315 ; CHECK: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr8_vgpr9
316 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub3_sub4
317 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
318 %0:vgpr(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
319 %1:vgpr(s64) = COPY $vgpr8_vgpr9
320 %2:vgpr(s256) = G_INSERT %0, %1, 96
321 S_ENDPGM 0, implicit %2
326 name: insert_s_s256_s_s64_128
328 regBankSelected: true
332 liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9
333 ; CHECK-LABEL: name: insert_s_s256_s_s64_128
334 ; CHECK: [[COPY:%[0-9]+]]:sreg_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
335 ; CHECK: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
336 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub4_sub5
337 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
338 %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
339 %1:sgpr(s64) = COPY $sgpr4_sgpr5
340 %2:sgpr(s256) = G_INSERT %0, %1, 128
341 S_ENDPGM 0, implicit %2
346 # name: insert_s_s256_s_s64_160
348 # regBankSelected: true
352 # liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9
353 # %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
354 # %1:sgpr(s64) = COPY $sgpr4_sgpr5
355 # %2:sgpr(s256) = G_INSERT %0, %1, 160
356 # S_ENDPGM 0, implicit %2
361 name: insert_s_s128_s_s96_0
363 regBankSelected: true
367 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr6_sgpr7_sgpr8
368 ; CHECK-LABEL: name: insert_s_s128_s_s96_0
369 ; CHECK: [[COPY:%[0-9]+]]:sgpr_128_with_sub0_sub1_sub2 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
370 ; CHECK: [[COPY1:%[0-9]+]]:sreg_96 = COPY $sgpr6_sgpr7_sgpr8
371 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sgpr_128 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1_sub2
372 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
373 %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
374 %1:sgpr(s96) = COPY $sgpr6_sgpr7_sgpr8
375 %2:sgpr(s128) = G_INSERT %0, %1, 0
376 S_ENDPGM 0, implicit %2
381 name: insert_s_s128_s_s96_32
383 regBankSelected: true
387 liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr6_sgpr7_sgpr8
388 ; CHECK-LABEL: name: insert_s_s128_s_s96_32
389 ; CHECK: [[COPY:%[0-9]+]]:sgpr_128_with_sub1_sub2_sub3 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
390 ; CHECK: [[COPY1:%[0-9]+]]:sreg_96 = COPY $sgpr6_sgpr7_sgpr8
391 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sgpr_128 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1_sub2_sub3
392 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
393 %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
394 %1:sgpr(s96) = COPY $sgpr6_sgpr7_sgpr8
395 %2:sgpr(s128) = G_INSERT %0, %1, 32
396 S_ENDPGM 0, implicit %2
401 name: insert_s_s160_s_s96_0
403 regBankSelected: true
407 liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4, $sgpr6_sgpr7_sgpr8
408 ; CHECK-LABEL: name: insert_s_s160_s_s96_0
409 ; CHECK: [[COPY:%[0-9]+]]:sgpr_160_with_sub0_sub1_sub2 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
410 ; CHECK: [[COPY1:%[0-9]+]]:sreg_96 = COPY $sgpr6_sgpr7_sgpr8
411 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_160 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1_sub2
412 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
413 %0:sgpr(s160) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
414 %1:sgpr(s96) = COPY $sgpr6_sgpr7_sgpr8
415 %2:sgpr(s160) = G_INSERT %0, %1, 0
416 S_ENDPGM 0, implicit %2
421 name: insert_s_s160_s_s96_32
423 regBankSelected: true
427 liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4, $sgpr6_sgpr7_sgpr8
428 ; CHECK-LABEL: name: insert_s_s160_s_s96_32
429 ; CHECK: [[COPY:%[0-9]+]]:sgpr_160_with_sub1_sub2_sub3 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
430 ; CHECK: [[COPY1:%[0-9]+]]:sreg_96 = COPY $sgpr6_sgpr7_sgpr8
431 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_160 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1_sub2_sub3
432 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
433 %0:sgpr(s160) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
434 %1:sgpr(s96) = COPY $sgpr6_sgpr7_sgpr8
435 %2:sgpr(s160) = G_INSERT %0, %1, 32
436 S_ENDPGM 0, implicit %2
441 name: insert_s_s160_s_s96_64
443 regBankSelected: true
447 liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4, $sgpr6_sgpr7_sgpr8
448 ; CHECK-LABEL: name: insert_s_s160_s_s96_64
449 ; CHECK: [[COPY:%[0-9]+]]:sgpr_160_with_sub2_sub3_sub4 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
450 ; CHECK: [[COPY1:%[0-9]+]]:sreg_96 = COPY $sgpr6_sgpr7_sgpr8
451 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_160 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub2_sub3_sub4
452 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
453 %0:sgpr(s160) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4
454 %1:sgpr(s96) = COPY $sgpr6_sgpr7_sgpr8
455 %2:sgpr(s160) = G_INSERT %0, %1, 64
456 S_ENDPGM 0, implicit %2
461 name: insert_s_s256_s_s128_0
463 regBankSelected: true
467 liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11
469 ; CHECK-LABEL: name: insert_s_s256_s_s128_0
470 ; CHECK: [[COPY:%[0-9]+]]:sreg_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
471 ; CHECK: [[COPY1:%[0-9]+]]:sgpr_128 = COPY $sgpr8_sgpr9_sgpr10_sgpr11
472 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:sreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub0_sub1_sub2_sub3
473 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
474 %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
475 %1:sgpr(s128) = COPY $sgpr8_sgpr9_sgpr10_sgpr11
476 %2:sgpr(s256) = G_INSERT %0, %1, 0
477 S_ENDPGM 0, implicit %2
482 name: insert_v_s256_v_s128_32
484 regBankSelected: true
488 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
490 ; CHECK-LABEL: name: insert_v_s256_v_s128_32
491 ; CHECK: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
492 ; CHECK: [[COPY1:%[0-9]+]]:vreg_128 = COPY $vgpr8_vgpr9_vgpr10_vgpr11
493 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub1_sub2_sub3_sub4
494 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
495 %0:vgpr(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
496 %1:vgpr(s128) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
497 %2:vgpr(s256) = G_INSERT %0, %1, 32
498 S_ENDPGM 0, implicit %2
503 name: insert_v_s256_v_s128_64
505 regBankSelected: true
509 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
511 ; CHECK-LABEL: name: insert_v_s256_v_s128_64
512 ; CHECK: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
513 ; CHECK: [[COPY1:%[0-9]+]]:vreg_128 = COPY $vgpr8_vgpr9_vgpr10_vgpr11
514 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub2_sub3_sub4_sub5
515 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
516 %0:vgpr(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
517 %1:vgpr(s128) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
518 %2:vgpr(s256) = G_INSERT %0, %1, 64
519 S_ENDPGM 0, implicit %2
524 name: insert_v_s256_v_s128_96
526 regBankSelected: true
530 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
532 ; CHECK-LABEL: name: insert_v_s256_v_s128_96
533 ; CHECK: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
534 ; CHECK: [[COPY1:%[0-9]+]]:vreg_128 = COPY $vgpr8_vgpr9_vgpr10_vgpr11
535 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub3_sub4_sub5_sub6
536 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
537 %0:vgpr(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
538 %1:vgpr(s128) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
539 %2:vgpr(s256) = G_INSERT %0, %1, 96
540 S_ENDPGM 0, implicit %2
545 name: insert_v_s256_v_s128_128
547 regBankSelected: true
551 liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11
553 ; CHECK-LABEL: name: insert_v_s256_v_s128_128
554 ; CHECK: [[COPY:%[0-9]+]]:vreg_256 = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
555 ; CHECK: [[COPY1:%[0-9]+]]:vreg_128 = COPY $vgpr8_vgpr9_vgpr10_vgpr11
556 ; CHECK: [[INSERT_SUBREG:%[0-9]+]]:vreg_256 = INSERT_SUBREG [[COPY]], [[COPY1]], %subreg.sub4_sub5_sub6_sub7
557 ; CHECK: S_ENDPGM 0, implicit [[INSERT_SUBREG]]
558 %0:vgpr(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
559 %1:vgpr(s128) = COPY $vgpr8_vgpr9_vgpr10_vgpr11
560 %2:vgpr(s256) = G_INSERT %0, %1, 128
561 S_ENDPGM 0, implicit %2