• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=instruction-select -verify-machineinstrs -global-isel-abort=2 -pass-remarks-missed='gisel*'  -o - %s | FileCheck -check-prefix=GCN  %s
3
4---
5name: test_merge_values_v_s64_v_s32_v_s32
6legalized:       true
7regBankSelected: true
8tracksRegLiveness: true
9
10body: |
11  bb.0:
12    liveins: $vgpr0, $vgpr1
13
14    ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_v_s32
15    ; GCN: liveins: $vgpr0, $vgpr1
16    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
17    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
18    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
19    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
20    %0:vgpr(s32) = COPY $vgpr0
21    %1:vgpr(s32) = COPY $vgpr1
22    %2:vgpr(s64) = G_MERGE_VALUES %0, %1
23    S_ENDPGM 0, implicit %2
24...
25
26---
27name: test_merge_values_v_s64_s_s32_v_s32
28legalized:       true
29regBankSelected: true
30tracksRegLiveness: true
31
32body: |
33  bb.0:
34    liveins: $sgpr0, $vgpr0
35
36    ; GCN-LABEL: name: test_merge_values_v_s64_s_s32_v_s32
37    ; GCN: liveins: $sgpr0, $vgpr0
38    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
39    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
40    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
41    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
42    %0:sgpr(s32) = COPY $sgpr0
43    %1:vgpr(s32) = COPY $vgpr0
44    %2:vgpr(s64) = G_MERGE_VALUES %0, %1
45    S_ENDPGM 0, implicit %2
46...
47
48---
49name: test_merge_values_v_s64_v_s32_s_s32
50legalized:       true
51regBankSelected: true
52tracksRegLiveness: true
53
54body: |
55  bb.0:
56    liveins: $sgpr0, $vgpr0
57
58    ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_s_s32
59    ; GCN: liveins: $sgpr0, $vgpr0
60    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
61    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
62    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
63    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
64    %0:vgpr(s32) = COPY $vgpr0
65    %1:sgpr(s32) = COPY $sgpr0
66    %2:vgpr(s64) = G_MERGE_VALUES %0, %1
67    S_ENDPGM 0, implicit %2
68...
69
70---
71name: test_merge_values_s_s64_s_s32_s_s32
72legalized:       true
73regBankSelected: true
74tracksRegLiveness: true
75
76body: |
77  bb.0:
78    liveins: $sgpr0, $sgpr1
79
80    ; GCN-LABEL: name: test_merge_values_s_s64_s_s32_s_s32
81    ; GCN: liveins: $sgpr0, $sgpr1
82    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
83    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
84    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
85    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
86    %0:sgpr(s32) = COPY $sgpr0
87    %1:sgpr(s32) = COPY $sgpr1
88    %2:sgpr(s64) = G_MERGE_VALUES %0, %1
89    S_ENDPGM 0, implicit %2
90...
91
92---
93name: test_merge_values_s_s96_s_s32_s_s32_s_s32
94legalized:       true
95regBankSelected: true
96
97body: |
98  bb.0:
99    liveins: $sgpr0, $sgpr1, $sgpr2
100
101    ; GCN-LABEL: name: test_merge_values_s_s96_s_s32_s_s32_s_s32
102    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
103    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
104    ; GCN: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
105    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
106    ; GCN: $sgpr0_sgpr1_sgpr2 = COPY [[REG_SEQUENCE]]
107    %0:sgpr(s32) = COPY $sgpr0
108    %1:sgpr(s32) = COPY $sgpr1
109    %2:sgpr(s32) = COPY $sgpr2
110    %3:sgpr(s96) = G_MERGE_VALUES %0, %1, %2
111    $sgpr0_sgpr1_sgpr2 = COPY %3
112...
113
114---
115name: test_merge_values_v_s96_v_s32_v_s32_v_s32
116legalized:       true
117regBankSelected: true
118tracksRegLiveness: true
119
120body: |
121  bb.0:
122    liveins: $vgpr0, $vgpr1, $vgpr2
123
124    ; GCN-LABEL: name: test_merge_values_v_s96_v_s32_v_s32_v_s32
125    ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2
126    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
127    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
128    ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
129    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
130    ; GCN: $vgpr0_vgpr1_vgpr2 = COPY [[REG_SEQUENCE]]
131    %0:vgpr(s32) = COPY $vgpr0
132    %1:vgpr(s32) = COPY $vgpr1
133    %2:vgpr(s32) = COPY $vgpr2
134    %3:vgpr(s96) = G_MERGE_VALUES %0, %1, %2
135    $vgpr0_vgpr1_vgpr2 = COPY %3
136...
137
138---
139name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
140legalized:       true
141regBankSelected: true
142tracksRegLiveness: true
143
144body: |
145  bb.0:
146    liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
147
148    ; GCN-LABEL: name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
149    ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
150    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
151    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
152    ; GCN: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
153    ; GCN: [[COPY3:%[0-9]+]]:sreg_32 = COPY $sgpr3
154    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
155    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
156    %0:sgpr(s32) = COPY $sgpr0
157    %1:sgpr(s32) = COPY $sgpr1
158    %2:sgpr(s32) = COPY $sgpr2
159    %3:sgpr(s32) = COPY $sgpr3
160    %4:sgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
161    $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
162...
163
164---
165name: test_merge_values_v_s128_v_s32_v_s32_v_s32
166legalized:       true
167regBankSelected: true
168tracksRegLiveness: true
169
170body: |
171  bb.0:
172    liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
173
174    ; GCN-LABEL: name: test_merge_values_v_s128_v_s32_v_s32_v_s32
175    ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
176    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
177    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
178    ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
179    ; GCN: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
180    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
181    ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
182    %0:vgpr(s32) = COPY $vgpr0
183    %1:vgpr(s32) = COPY $vgpr1
184    %2:vgpr(s32) = COPY $vgpr2
185    %3:vgpr(s32) = COPY $vgpr3
186    %4:vgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
187    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
188...
189
190---
191name: test_merge_values_s_s128_s_s64_s_s64
192legalized:       true
193regBankSelected: true
194tracksRegLiveness: true
195
196body: |
197  bb.0:
198    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
199
200    ; GCN-LABEL: name: test_merge_values_s_s128_s_s64_s_s64
201    ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
202    ; GCN: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
203    ; GCN: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
204    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
205    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
206    %0:sgpr(s64) = COPY $sgpr0_sgpr1
207    %1:sgpr(s64) = COPY $sgpr2_sgpr3
208    %4:sgpr(s128) = G_MERGE_VALUES %0, %1
209    $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
210...
211
212---
213name: test_merge_values_v_s128_v_s64_v_s64
214legalized:       true
215regBankSelected: true
216tracksRegLiveness: true
217
218body: |
219  bb.0:
220    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
221
222    ; GCN-LABEL: name: test_merge_values_v_s128_v_s64_v_s64
223    ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
224    ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
225    ; GCN: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
226    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
227    ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
228    %0:vgpr(s64) = COPY $vgpr0_vgpr1
229    %1:vgpr(s64) = COPY $vgpr2_vgpr3
230    %2:vgpr(s128) = G_MERGE_VALUES %0, %1
231    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
232...
233
234---
235name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
236legalized:       true
237regBankSelected: true
238tracksRegLiveness: true
239
240body: |
241  bb.0:
242    liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
243
244    ; GCN-LABEL: name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
245    ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
246    ; GCN: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
247    ; GCN: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
248    ; GCN: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
249    ; GCN: [[COPY3:%[0-9]+]]:sreg_32 = COPY $sgpr3
250    ; GCN: [[COPY4:%[0-9]+]]:sreg_32 = COPY $sgpr4
251    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
252    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY [[REG_SEQUENCE]]
253    %0:sgpr(s32) = COPY $sgpr0
254    %1:sgpr(s32) = COPY $sgpr1
255    %2:sgpr(s32) = COPY $sgpr2
256    %3:sgpr(s32) = COPY $sgpr3
257    %4:sgpr(s32) = COPY $sgpr4
258    %5:sgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
259    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY %5
260...
261
262---
263name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
264legalized:       true
265regBankSelected: true
266tracksRegLiveness: true
267
268body: |
269  bb.0:
270    liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
271
272    ; GCN-LABEL: name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
273    ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
274    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
275    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
276    ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
277    ; GCN: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
278    ; GCN: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr4
279    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
280    ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY [[REG_SEQUENCE]]
281    %0:vgpr(s32) = COPY $vgpr0
282    %1:vgpr(s32) = COPY $vgpr1
283    %2:vgpr(s32) = COPY $vgpr2
284    %3:vgpr(s32) = COPY $vgpr3
285    %4:vgpr(s32) = COPY $vgpr4
286    %5:vgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
287    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY %5
288...
289
290---
291name: test_merge_values_s_s192_s_s64_s_s64_s_s64
292legalized:       true
293regBankSelected: true
294tracksRegLiveness: true
295
296body: |
297  bb.0:
298    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
299
300    ; GCN-LABEL: name: test_merge_values_s_s192_s_s64_s_s64_s_s64
301    ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
302    ; GCN: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
303    ; GCN: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
304    ; GCN: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
305    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_192 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5
306    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
307    %0:sgpr(s64) = COPY $sgpr0_sgpr1
308    %1:sgpr(s64) = COPY $sgpr2_sgpr3
309    %2:sgpr(s64) = COPY $sgpr4_sgpr5
310    %3:sgpr(s192) = G_MERGE_VALUES %0, %1, %2
311    S_ENDPGM 0, implicit %3
312...
313
314---
315name: test_merge_values_v_s192_v_s64_v_s64_v_s64
316legalized:       true
317regBankSelected: true
318tracksRegLiveness: true
319
320body: |
321  bb.0:
322    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
323
324    ; GCN-LABEL: name: test_merge_values_v_s192_v_s64_v_s64_v_s64
325    ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
326    ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
327    ; GCN: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
328    ; GCN: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr4_vgpr5
329    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_192 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5
330    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
331    %0:vgpr(s64) = COPY $vgpr0_vgpr1
332    %1:vgpr(s64) = COPY $vgpr2_vgpr3
333    %2:vgpr(s64) = COPY $vgpr4_vgpr5
334    %3:vgpr(s192) = G_MERGE_VALUES %0, %1, %2
335    S_ENDPGM 0, implicit %3
336...
337
338---
339name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
340legalized:       true
341regBankSelected: true
342tracksRegLiveness: true
343
344body: |
345  bb.0:
346    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
347
348    ; GCN-LABEL: name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
349    ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
350    ; GCN: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
351    ; GCN: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
352    ; GCN: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
353    ; GCN: [[COPY3:%[0-9]+]]:sreg_64 = COPY $sgpr6_sgpr7
354    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5, [[COPY3]], %subreg.sub6_sub7
355    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
356    %0:sgpr(s64) = COPY $sgpr0_sgpr1
357    %1:sgpr(s64) = COPY $sgpr2_sgpr3
358    %2:sgpr(s64) = COPY $sgpr4_sgpr5
359    %3:sgpr(s64) = COPY $sgpr6_sgpr7
360    %4:sgpr(s256) = G_MERGE_VALUES %0, %1, %2, %3
361    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %4
362...
363
364---
365name: test_merge_values_s_s256_s_s128_s_s128
366legalized:       true
367regBankSelected: true
368tracksRegLiveness: true
369
370body: |
371  bb.0:
372    liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
373
374    ; GCN-LABEL: name: test_merge_values_s_s256_s_s128_s_s128
375    ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
376    ; GCN: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
377    ; GCN: [[COPY1:%[0-9]+]]:sgpr_128 = COPY $sgpr4_sgpr5_sgpr6_sgpr7
378    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3, [[COPY1]], %subreg.sub4_sub5_sub6_sub7
379    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
380    %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
381    %1:sgpr(s128) = COPY $sgpr4_sgpr5_sgpr6_sgpr7
382    %2:sgpr(s256) = G_MERGE_VALUES %0, %1
383    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %2
384...
385
386---
387name: test_merge_values_s_s512_s_s256_s_s256
388legalized:       true
389regBankSelected: true
390tracksRegLiveness: true
391
392body: |
393  bb.0:
394    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
395
396    ; GCN-LABEL: name: test_merge_values_s_s512_s_s256_s_s256
397    ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
398    ; GCN: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
399    ; GCN: [[COPY1:%[0-9]+]]:sgpr_256 = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
400    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_512 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3_sub4_sub5_sub6_sub7, [[COPY1]], %subreg.sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15
401    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
402    %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7,
403    %1:sgpr(s256) = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
404    %4:sgpr(s512) = G_MERGE_VALUES %0, %1
405    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %4
406...
407
408---
409name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
410legalized:       true
411regBankSelected: true
412tracksRegLiveness: true
413
414body: |
415  bb.0:
416    liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
417
418    ; GCN-LABEL: name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
419    ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
420    ; GCN: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
421    ; GCN: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
422    ; GCN: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
423    ; GCN: [[COPY3:%[0-9]+]]:sreg_64 = COPY $sgpr6_sgpr7
424    ; GCN: [[COPY4:%[0-9]+]]:sreg_64 = COPY $sgpr8_sgpr9
425    ; GCN: [[COPY5:%[0-9]+]]:sreg_64 = COPY $sgpr10_sgpr11
426    ; GCN: [[COPY6:%[0-9]+]]:sreg_64 = COPY $sgpr12_sgpr13
427    ; GCN: [[COPY7:%[0-9]+]]:sreg_64 = COPY $sgpr14_sgpr15
428    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_512 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5, [[COPY3]], %subreg.sub6_sub7, [[COPY4]], %subreg.sub8_sub9, [[COPY5]], %subreg.sub10_sub11, [[COPY6]], %subreg.sub12_sub13, [[COPY7]], %subreg.sub14_sub15
429    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
430    %0:sgpr(s64) = COPY $sgpr0_sgpr1
431    %1:sgpr(s64) = COPY $sgpr2_sgpr3
432    %2:sgpr(s64) = COPY $sgpr4_sgpr5
433    %3:sgpr(s64) = COPY $sgpr6_sgpr7
434    %4:sgpr(s64) = COPY $sgpr8_sgpr9
435    %5:sgpr(s64) = COPY $sgpr10_sgpr11
436    %6:sgpr(s64) = COPY $sgpr12_sgpr13
437    %7:sgpr(s64) = COPY $sgpr14_sgpr15
438    %8:sgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
439    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %8
440...
441
442---
443name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
444legalized:       true
445regBankSelected: true
446tracksRegLiveness: true
447
448body: |
449  bb.0:
450    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
451
452    ; GCN-LABEL: name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
453    ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
454    ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
455    ; GCN: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
456    ; GCN: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr4_vgpr5
457    ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY $vgpr6_vgpr7
458    ; GCN: [[COPY4:%[0-9]+]]:vreg_64 = COPY $vgpr8_vgpr9
459    ; GCN: [[COPY5:%[0-9]+]]:vreg_64 = COPY $vgpr10_vgpr11
460    ; GCN: [[COPY6:%[0-9]+]]:vreg_64 = COPY $vgpr12_vgpr13
461    ; GCN: [[COPY7:%[0-9]+]]:vreg_64 = COPY $vgpr14_vgpr15
462    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_512 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5, [[COPY3]], %subreg.sub6_sub7, [[COPY4]], %subreg.sub8_sub9, [[COPY5]], %subreg.sub10_sub11, [[COPY6]], %subreg.sub12_sub13, [[COPY7]], %subreg.sub14_sub15
463    ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[REG_SEQUENCE]]
464    %0:vgpr(s64) = COPY $vgpr0_vgpr1
465    %1:vgpr(s64) = COPY $vgpr2_vgpr3
466    %2:vgpr(s64) = COPY $vgpr4_vgpr5
467    %3:vgpr(s64) = COPY $vgpr6_vgpr7
468    %4:vgpr(s64) = COPY $vgpr8_vgpr9
469    %5:vgpr(s64) = COPY $vgpr10_vgpr11
470    %6:vgpr(s64) = COPY $vgpr12_vgpr13
471    %7:vgpr(s64) = COPY $vgpr14_vgpr15
472    %8:vgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
473    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %8
474...
475
476---
477name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
478legalized:       true
479regBankSelected: true
480tracksRegLiveness: true
481
482body: |
483  bb.0:
484    liveins: $vgpr0, $vgpr1
485
486    ; GCN-LABEL: name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
487    ; GCN: liveins: $vgpr0, $vgpr1
488    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
489    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
490    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
491    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
492    %0:vgpr_32(s32) = COPY $vgpr0
493    %1:vgpr_32(s32) = COPY $vgpr1
494    %2:vgpr(s64) = G_MERGE_VALUES %0, %1
495    S_ENDPGM 0, implicit %2
496...
497
498---
499name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
500legalized:       true
501regBankSelected: true
502tracksRegLiveness: true
503
504body: |
505  bb.0:
506    liveins: $vgpr0, $vgpr1
507
508    ; GCN-LABEL: name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
509    ; GCN: liveins: $vgpr0, $vgpr1
510    ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
511    ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
512    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
513    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
514    %0:vgpr(s32) = COPY $vgpr0
515    %1:vgpr(s32) = COPY $vgpr1
516    %2:vreg_64(s64) = G_MERGE_VALUES %0, %1
517    S_ENDPGM 0, implicit %2
518...
519
520---
521name: test_merge_values_s_s1024_s_s256_s_s256_s_s256_s_s256
522legalized:       true
523regBankSelected: true
524tracksRegLiveness: true
525
526body: |
527  bb.0:
528    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
529
530    ; GCN-LABEL: name: test_merge_values_s_s1024_s_s256_s_s256_s_s256_s_s256
531    ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
532    ; GCN: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
533    ; GCN: [[DEF:%[0-9]+]]:sgpr_256 = IMPLICIT_DEF
534    ; GCN: [[COPY1:%[0-9]+]]:sgpr_256 = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
535    ; GCN: [[DEF1:%[0-9]+]]:sgpr_256 = IMPLICIT_DEF
536    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_1024 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3_sub4_sub5_sub6_sub7, [[DEF]], %subreg.sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15, [[COPY1]], %subreg.sub16_sub17_sub18_sub19_sub20_sub21_sub22_sub23, [[DEF1]], %subreg.sub24_sub25_sub26_sub27_sub28_sub29_sub30_sub31
537    ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
538    %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7,
539    %1:sgpr(s256) = G_IMPLICIT_DEF
540    %2:sgpr(s256) = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
541    %3:sgpr(s256) = G_IMPLICIT_DEF
542    %4:sgpr(s1024) = G_MERGE_VALUES %0, %1, %2, %3
543    S_ENDPGM 0, implicit %4
544...
545
546---
547
548name: test_merge_values_s_s1024_s_s512
549legalized:       true
550regBankSelected: true
551tracksRegLiveness: true
552
553body: |
554  bb.0:
555    liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15, $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
556
557    ; GCN-LABEL: name: test_merge_values_s_s1024_s_s512
558    ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15, $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
559    ; GCN: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
560    ; GCN: [[COPY1:%[0-9]+]]:sgpr_512 = COPY $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
561    ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sgpr_1024 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3_sub4_sub5_sub6_sub7_sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15, [[COPY1]], %subreg.sub16_sub17_sub18_sub19_sub20_sub21_sub22_sub23_sub24_sub25_sub26_sub27_sub28_sub29_sub30_sub31
562    ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31 = COPY [[REG_SEQUENCE]]
563    %0:sgpr(s512) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
564    %1:sgpr(s512) = COPY $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
565    %2:sgpr(s1024) = G_MERGE_VALUES %0, %1
566    $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15_sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31 = COPY %2
567
568...
569