[llvm-objdump] - Remove one overload of reportError. NFCI.
[llvm-complete.git] / test / CodeGen / AMDGPU / GlobalISel / inst-select-merge-values.mir
blob613601841d93b09b62d8a60a937c503a668754df
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 2> %t | FileCheck -check-prefix=GCN  %s
3 # RUN: FileCheck -check-prefix=ERR %s < %t
6 # ERR-NOT: remark:
7 # ERR: remark: <unknown>:0:0: cannot select: %3:sgpr(s192) = G_MERGE_VALUES %0:sgpr(s64), %1:sgpr(s64), %2:sgpr(s64) (in function: test_merge_values_s_s192_s_s64_s_s64_s_s64)
8 # ERR-NEXT: remark: <unknown>:0:0: cannot select: %3:vgpr(s192) = G_MERGE_VALUES %0:vgpr(s64), %1:vgpr(s64), %2:vgpr(s64) (in function: test_merge_values_v_s192_v_s64_v_s64_v_s64)
9 # ERR-NOT: remark:
11 ---
12 name: test_merge_values_v_s64_v_s32_v_s32
13 legalized:       true
14 regBankSelected: true
15 tracksRegLiveness: true
17 body: |
18   bb.0:
19     liveins: $vgpr0, $vgpr1
21     ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_v_s32
22     ; GCN: liveins: $vgpr0, $vgpr1
23     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
24     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
25     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
26     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
27     %0:vgpr(s32) = COPY $vgpr0
28     %1:vgpr(s32) = COPY $vgpr1
29     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
30     S_ENDPGM 0, implicit %2
31 ...
33 ---
34 name: test_merge_values_v_s64_s_s32_v_s32
35 legalized:       true
36 regBankSelected: true
37 tracksRegLiveness: true
39 body: |
40   bb.0:
41     liveins: $sgpr0, $vgpr0
43     ; GCN-LABEL: name: test_merge_values_v_s64_s_s32_v_s32
44     ; GCN: liveins: $sgpr0, $vgpr0
45     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
46     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
47     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
48     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
49     %0:sgpr(s32) = COPY $sgpr0
50     %1:vgpr(s32) = COPY $vgpr0
51     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
52     S_ENDPGM 0, implicit %2
53 ...
55 ---
56 name: test_merge_values_v_s64_v_s32_s_s32
57 legalized:       true
58 regBankSelected: true
59 tracksRegLiveness: true
61 body: |
62   bb.0:
63     liveins: $sgpr0, $vgpr0
65     ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_s_s32
66     ; GCN: liveins: $sgpr0, $vgpr0
67     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
68     ; GCN: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
69     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
70     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
71     %0:vgpr(s32) = COPY $vgpr0
72     %1:sgpr(s32) = COPY $sgpr0
73     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
74     S_ENDPGM 0, implicit %2
75 ...
77 ---
78 name: test_merge_values_s_s64_s_s32_s_s32
79 legalized:       true
80 regBankSelected: true
81 tracksRegLiveness: true
83 body: |
84   bb.0:
85     liveins: $sgpr0, $sgpr1
87     ; GCN-LABEL: name: test_merge_values_s_s64_s_s32_s_s32
88     ; GCN: liveins: $sgpr0, $sgpr1
89     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
90     ; GCN: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr1
91     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
92     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
93     %0:sgpr(s32) = COPY $sgpr0
94     %1:sgpr(s32) = COPY $sgpr1
95     %2:sgpr(s64) = G_MERGE_VALUES %0, %1
96     S_ENDPGM 0, implicit %2
97 ...
99 ---
100 name: test_merge_values_s_s64_undef_s_s32_s_s32
101 legalized:       true
102 regBankSelected: true
103 tracksRegLiveness: true
105 body: |
106   bb.0:
107     liveins: $sgpr0
109     ; GCN-LABEL: name: test_merge_values_s_s64_undef_s_s32_s_s32
110     ; GCN: liveins: $sgpr0
111     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
112     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE undef %2:sreg_32_xm0, %subreg.sub0, [[COPY]], %subreg.sub1
113     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
114     %1:sgpr(s32) = COPY $sgpr0
115     %2:sgpr(s64) = G_MERGE_VALUES undef %0:sgpr(s32), %1
116     S_ENDPGM 0, implicit %2
120 name: test_merge_values_s_s64_s_s32_undef_s_s32
121 legalized:       true
122 regBankSelected: true
123 tracksRegLiveness: true
125 body: |
126   bb.0:
127     liveins: $sgpr0
129     ; GCN-LABEL: name: test_merge_values_s_s64_s_s32_undef_s_s32
130     ; GCN: liveins: $sgpr0
131     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
132     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_64_xexec = REG_SEQUENCE [[COPY]], %subreg.sub0, undef %2:sreg_32_xm0, %subreg.sub1
133     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
134     %0:sgpr(s32) = COPY $sgpr0
135     %2:sgpr(s64) = G_MERGE_VALUES %0, undef %1:sgpr(s32),
136     S_ENDPGM 0, implicit %2
140 name: test_merge_values_s_s96_s_s32_s_s32_s_s32
141 legalized:       true
142 regBankSelected: true
144 body: |
145   bb.0:
146     liveins: $sgpr0, $sgpr1, $sgpr2
148     ; GCN-LABEL: name: test_merge_values_s_s96_s_s32_s_s32_s_s32
149     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
150     ; GCN: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr1
151     ; GCN: [[COPY2:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr2
152     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
153     ; GCN: $sgpr0_sgpr1_sgpr2 = COPY [[REG_SEQUENCE]]
154     %0:sgpr(s32) = COPY $sgpr0
155     %1:sgpr(s32) = COPY $sgpr1
156     %2:sgpr(s32) = COPY $sgpr2
157     %3:sgpr(s96) = G_MERGE_VALUES %0, %1, %2
158     $sgpr0_sgpr1_sgpr2 = COPY %3
162 name: test_merge_values_v_s96_v_s32_v_s32_v_s32
163 legalized:       true
164 regBankSelected: true
165 tracksRegLiveness: true
167 body: |
168   bb.0:
169     liveins: $vgpr0, $vgpr1, $vgpr2
171     ; GCN-LABEL: name: test_merge_values_v_s96_v_s32_v_s32_v_s32
172     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2
173     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
174     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
175     ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
176     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
177     ; GCN: $vgpr0_vgpr1_vgpr2 = COPY [[REG_SEQUENCE]]
178     %0:vgpr(s32) = COPY $vgpr0
179     %1:vgpr(s32) = COPY $vgpr1
180     %2:vgpr(s32) = COPY $vgpr2
181     %3:vgpr(s96) = G_MERGE_VALUES %0, %1, %2
182     $vgpr0_vgpr1_vgpr2 = COPY %3
186 name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
187 legalized:       true
188 regBankSelected: true
189 tracksRegLiveness: true
191 body: |
192   bb.0:
193     liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
195     ; GCN-LABEL: name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
196     ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
197     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
198     ; GCN: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr1
199     ; GCN: [[COPY2:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr2
200     ; GCN: [[COPY3:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr3
201     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
202     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
203     %0:sgpr(s32) = COPY $sgpr0
204     %1:sgpr(s32) = COPY $sgpr1
205     %2:sgpr(s32) = COPY $sgpr2
206     %3:sgpr(s32) = COPY $sgpr3
207     %4:sgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
208     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
212 name: test_merge_values_v_s128_v_s32_v_s32_v_s32
213 legalized:       true
214 regBankSelected: true
215 tracksRegLiveness: true
217 body: |
218   bb.0:
219     liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
221     ; GCN-LABEL: name: test_merge_values_v_s128_v_s32_v_s32_v_s32
222     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
223     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
224     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
225     ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
226     ; GCN: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
227     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
228     ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
229     %0:vgpr(s32) = COPY $vgpr0
230     %1:vgpr(s32) = COPY $vgpr1
231     %2:vgpr(s32) = COPY $vgpr2
232     %3:vgpr(s32) = COPY $vgpr3
233     %4:vgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
234     $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
238 name: test_merge_values_s_s128_s_s64_s_s64
239 legalized:       true
240 regBankSelected: true
241 tracksRegLiveness: true
243 body: |
244   bb.0:
245     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
247     ; GCN-LABEL: name: test_merge_values_s_s128_s_s64_s_s64
248     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
249     ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
250     ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr2_sgpr3
251     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
252     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
253     %0:sgpr(s64) = COPY $sgpr0_sgpr1
254     %1:sgpr(s64) = COPY $sgpr2_sgpr3
255     %4:sgpr(s128) = G_MERGE_VALUES %0, %1
256     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
260 name: test_merge_values_v_s128_v_s64_v_s64
261 legalized:       true
262 regBankSelected: true
263 tracksRegLiveness: true
265 body: |
266   bb.0:
267     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
269     ; GCN-LABEL: name: test_merge_values_v_s128_v_s64_v_s64
270     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
271     ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
272     ; GCN: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
273     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
274     ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
275     %0:vgpr(s64) = COPY $vgpr0_vgpr1
276     %1:vgpr(s64) = COPY $vgpr2_vgpr3
277     %2:vgpr(s128) = G_MERGE_VALUES %0, %1
278     $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
282 name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
283 legalized:       true
284 regBankSelected: true
285 tracksRegLiveness: true
287 body: |
288   bb.0:
289     liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
291     ; GCN-LABEL: name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
292     ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
293     ; GCN: [[COPY:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr0
294     ; GCN: [[COPY1:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr1
295     ; GCN: [[COPY2:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr2
296     ; GCN: [[COPY3:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr3
297     ; GCN: [[COPY4:%[0-9]+]]:sreg_32_xm0 = COPY $sgpr4
298     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
299     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY [[REG_SEQUENCE]]
300     %0:sgpr(s32) = COPY $sgpr0
301     %1:sgpr(s32) = COPY $sgpr1
302     %2:sgpr(s32) = COPY $sgpr2
303     %3:sgpr(s32) = COPY $sgpr3
304     %4:sgpr(s32) = COPY $sgpr4
305     %5:sgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
306     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY %5
310 name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
311 legalized:       true
312 regBankSelected: true
313 tracksRegLiveness: true
315 body: |
316   bb.0:
317     liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
319     ; GCN-LABEL: name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
320     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
321     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
322     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
323     ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
324     ; GCN: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
325     ; GCN: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr4
326     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
327     ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY [[REG_SEQUENCE]]
328     %0:vgpr(s32) = COPY $vgpr0
329     %1:vgpr(s32) = COPY $vgpr1
330     %2:vgpr(s32) = COPY $vgpr2
331     %3:vgpr(s32) = COPY $vgpr3
332     %4:vgpr(s32) = COPY $vgpr4
333     %5:vgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
334     $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY %5
338 name: test_merge_values_s_s192_s_s64_s_s64_s_s64
339 legalized:       true
340 regBankSelected: true
341 tracksRegLiveness: true
343 body: |
344   bb.0:
345     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
347     ; GCN-LABEL: name: test_merge_values_s_s192_s_s64_s_s64_s_s64
348     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
349     ; GCN: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
350     ; GCN: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
351     ; GCN: [[COPY2:%[0-9]+]]:sgpr(s64) = COPY $sgpr4_sgpr5
352     ; GCN: [[MV:%[0-9]+]]:sgpr(s192) = G_MERGE_VALUES [[COPY]](s64), [[COPY1]](s64), [[COPY2]](s64)
353     ; GCN: S_ENDPGM 0, implicit [[MV]](s192)
354     %0:sgpr(s64) = COPY $sgpr0_sgpr1
355     %1:sgpr(s64) = COPY $sgpr2_sgpr3
356     %2:sgpr(s64) = COPY $sgpr4_sgpr5
357     %3:sgpr(s192) = G_MERGE_VALUES %0, %1, %2
358     S_ENDPGM 0, implicit %3
362 name: test_merge_values_v_s192_v_s64_v_s64_v_s64
363 legalized:       true
364 regBankSelected: true
365 tracksRegLiveness: true
367 body: |
368   bb.0:
369     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
371     ; GCN-LABEL: name: test_merge_values_v_s192_v_s64_v_s64_v_s64
372     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
373     ; GCN: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
374     ; GCN: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
375     ; GCN: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY $vgpr4_vgpr5
376     ; GCN: [[MV:%[0-9]+]]:vgpr(s192) = G_MERGE_VALUES [[COPY]](s64), [[COPY1]](s64), [[COPY2]](s64)
377     ; GCN: S_ENDPGM 0, implicit [[MV]](s192)
378     %0:vgpr(s64) = COPY $vgpr0_vgpr1
379     %1:vgpr(s64) = COPY $vgpr2_vgpr3
380     %2:vgpr(s64) = COPY $vgpr4_vgpr5
381     %3:vgpr(s192) = G_MERGE_VALUES %0, %1, %2
382     S_ENDPGM 0, implicit %3
386 name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
387 legalized:       true
388 regBankSelected: true
389 tracksRegLiveness: true
391 body: |
392   bb.0:
393     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
395     ; GCN-LABEL: name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
396     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
397     ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
398     ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr2_sgpr3
399     ; GCN: [[COPY2:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
400     ; GCN: [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY $sgpr6_sgpr7
401     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5, [[COPY3]], %subreg.sub6_sub7
402     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
403     %0:sgpr(s64) = COPY $sgpr0_sgpr1
404     %1:sgpr(s64) = COPY $sgpr2_sgpr3
405     %2:sgpr(s64) = COPY $sgpr4_sgpr5
406     %3:sgpr(s64) = COPY $sgpr6_sgpr7
407     %4:sgpr(s256) = G_MERGE_VALUES %0, %1, %2, %3
408     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %4
412 name: test_merge_values_s_s256_s_s128_s_s128
413 legalized:       true
414 regBankSelected: true
415 tracksRegLiveness: true
417 body: |
418   bb.0:
419     liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
421     ; GCN-LABEL: name: test_merge_values_s_s256_s_s128_s_s128
422     ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
423     ; GCN: [[COPY:%[0-9]+]]:sreg_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
424     ; GCN: [[COPY1:%[0-9]+]]:sreg_128 = COPY $sgpr4_sgpr5_sgpr6_sgpr7
425     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3, [[COPY1]], %subreg.sub4_sub5_sub6_sub7
426     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
427     %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
428     %1:sgpr(s128) = COPY $sgpr4_sgpr5_sgpr6_sgpr7
429     %2:sgpr(s256) = G_MERGE_VALUES %0, %1
430     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %2
434 name: test_merge_values_s_s512_s_s256_s_s256
435 legalized:       true
436 regBankSelected: true
437 tracksRegLiveness: true
439 body: |
440   bb.0:
441     liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
443     ; GCN-LABEL: name: test_merge_values_s_s512_s_s256_s_s256
444     ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
445     ; GCN: [[COPY:%[0-9]+]]:sreg_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
446     ; GCN: [[COPY1:%[0-9]+]]:sreg_256 = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
447     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_512 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3_sub4_sub5_sub6_sub7, [[COPY1]], %subreg.sub8_sub9_sub10_sub11_sub12_sub13_sub14_sub15
448     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
449     %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7,
450     %1:sgpr(s256) = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
451     %4:sgpr(s512) = G_MERGE_VALUES %0, %1
452     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %4
456 name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
457 legalized:       true
458 regBankSelected: true
459 tracksRegLiveness: true
461 body: |
462   bb.0:
463     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
465     ; GCN-LABEL: name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
466     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
467     ; GCN: [[COPY:%[0-9]+]]:sreg_64_xexec = COPY $sgpr0_sgpr1
468     ; GCN: [[COPY1:%[0-9]+]]:sreg_64_xexec = COPY $sgpr2_sgpr3
469     ; GCN: [[COPY2:%[0-9]+]]:sreg_64_xexec = COPY $sgpr4_sgpr5
470     ; GCN: [[COPY3:%[0-9]+]]:sreg_64_xexec = COPY $sgpr6_sgpr7
471     ; GCN: [[COPY4:%[0-9]+]]:sreg_64_xexec = COPY $sgpr8_sgpr9
472     ; GCN: [[COPY5:%[0-9]+]]:sreg_64_xexec = COPY $sgpr10_sgpr11
473     ; GCN: [[COPY6:%[0-9]+]]:sreg_64_xexec = COPY $sgpr12_sgpr13
474     ; GCN: [[COPY7:%[0-9]+]]:sreg_64_xexec = COPY $sgpr14_sgpr15
475     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:sreg_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
476     ; GCN: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
477     %0:sgpr(s64) = COPY $sgpr0_sgpr1
478     %1:sgpr(s64) = COPY $sgpr2_sgpr3
479     %2:sgpr(s64) = COPY $sgpr4_sgpr5
480     %3:sgpr(s64) = COPY $sgpr6_sgpr7
481     %4:sgpr(s64) = COPY $sgpr8_sgpr9
482     %5:sgpr(s64) = COPY $sgpr10_sgpr11
483     %6:sgpr(s64) = COPY $sgpr12_sgpr13
484     %7:sgpr(s64) = COPY $sgpr14_sgpr15
485     %8:sgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
486     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %8
490 name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
491 legalized:       true
492 regBankSelected: true
493 tracksRegLiveness: true
495 body: |
496   bb.0:
497     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
499     ; GCN-LABEL: name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
500     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
501     ; GCN: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
502     ; GCN: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
503     ; GCN: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr4_vgpr5
504     ; GCN: [[COPY3:%[0-9]+]]:vreg_64 = COPY $vgpr6_vgpr7
505     ; GCN: [[COPY4:%[0-9]+]]:vreg_64 = COPY $vgpr8_vgpr9
506     ; GCN: [[COPY5:%[0-9]+]]:vreg_64 = COPY $vgpr10_vgpr11
507     ; GCN: [[COPY6:%[0-9]+]]:vreg_64 = COPY $vgpr12_vgpr13
508     ; GCN: [[COPY7:%[0-9]+]]:vreg_64 = COPY $vgpr14_vgpr15
509     ; 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
510     ; GCN: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[REG_SEQUENCE]]
511     %0:vgpr(s64) = COPY $vgpr0_vgpr1
512     %1:vgpr(s64) = COPY $vgpr2_vgpr3
513     %2:vgpr(s64) = COPY $vgpr4_vgpr5
514     %3:vgpr(s64) = COPY $vgpr6_vgpr7
515     %4:vgpr(s64) = COPY $vgpr8_vgpr9
516     %5:vgpr(s64) = COPY $vgpr10_vgpr11
517     %6:vgpr(s64) = COPY $vgpr12_vgpr13
518     %7:vgpr(s64) = COPY $vgpr14_vgpr15
519     %8:vgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
520     $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %8
524 name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
525 legalized:       true
526 regBankSelected: true
527 tracksRegLiveness: true
529 body: |
530   bb.0:
531     liveins: $vgpr0, $vgpr1
533     ; GCN-LABEL: name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
534     ; GCN: liveins: $vgpr0, $vgpr1
535     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
536     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
537     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
538     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
539     %0:vgpr_32(s32) = COPY $vgpr0
540     %1:vgpr_32(s32) = COPY $vgpr1
541     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
542     S_ENDPGM 0, implicit %2
546 name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
547 legalized:       true
548 regBankSelected: true
549 tracksRegLiveness: true
551 body: |
552   bb.0:
553     liveins: $vgpr0, $vgpr1
555     ; GCN-LABEL: name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
556     ; GCN: liveins: $vgpr0, $vgpr1
557     ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
558     ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
559     ; GCN: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
560     ; GCN: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
561     %0:vgpr(s32) = COPY $vgpr0
562     %1:vgpr(s32) = COPY $vgpr1
563     %2:vreg_64(s64) = G_MERGE_VALUES %0, %1
564     S_ENDPGM 0, implicit %2