[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / CodeGen / AMDGPU / GlobalISel / inst-select-merge-values.mir
bloba030506f6af59254190ff12dcea2254472f8e042
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
4 ---
5 name: test_merge_values_v_s64_v_s32_v_s32
6 legalized:       true
7 regBankSelected: true
8 tracksRegLiveness: true
10 body: |
11   bb.0:
12     liveins: $vgpr0, $vgpr1
14     ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_v_s32
15     ; GCN: liveins: $vgpr0, $vgpr1
16     ; GCN-NEXT: {{  $}}
17     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
18     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
19     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
20     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
21     %0:vgpr(s32) = COPY $vgpr0
22     %1:vgpr(s32) = COPY $vgpr1
23     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
24     S_ENDPGM 0, implicit %2
25 ...
27 ---
28 name: test_merge_values_v_s64_s_s32_v_s32
29 legalized:       true
30 regBankSelected: true
31 tracksRegLiveness: true
33 body: |
34   bb.0:
35     liveins: $sgpr0, $vgpr0
37     ; GCN-LABEL: name: test_merge_values_v_s64_s_s32_v_s32
38     ; GCN: liveins: $sgpr0, $vgpr0
39     ; GCN-NEXT: {{  $}}
40     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
41     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
42     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
43     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
44     %0:sgpr(s32) = COPY $sgpr0
45     %1:vgpr(s32) = COPY $vgpr0
46     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
47     S_ENDPGM 0, implicit %2
48 ...
50 ---
51 name: test_merge_values_v_s64_v_s32_s_s32
52 legalized:       true
53 regBankSelected: true
54 tracksRegLiveness: true
56 body: |
57   bb.0:
58     liveins: $sgpr0, $vgpr0
60     ; GCN-LABEL: name: test_merge_values_v_s64_v_s32_s_s32
61     ; GCN: liveins: $sgpr0, $vgpr0
62     ; GCN-NEXT: {{  $}}
63     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
64     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr0
65     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
66     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
67     %0:vgpr(s32) = COPY $vgpr0
68     %1:sgpr(s32) = COPY $sgpr0
69     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
70     S_ENDPGM 0, implicit %2
71 ...
73 ---
74 name: test_merge_values_s_s64_s_s32_s_s32
75 legalized:       true
76 regBankSelected: true
77 tracksRegLiveness: true
79 body: |
80   bb.0:
81     liveins: $sgpr0, $sgpr1
83     ; GCN-LABEL: name: test_merge_values_s_s64_s_s32_s_s32
84     ; GCN: liveins: $sgpr0, $sgpr1
85     ; GCN-NEXT: {{  $}}
86     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
87     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
88     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
89     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
90     %0:sgpr(s32) = COPY $sgpr0
91     %1:sgpr(s32) = COPY $sgpr1
92     %2:sgpr(s64) = G_MERGE_VALUES %0, %1
93     S_ENDPGM 0, implicit %2
94 ...
96 ---
97 name: test_merge_values_s_s96_s_s32_s_s32_s_s32
98 legalized:       true
99 regBankSelected: true
101 body: |
102   bb.0:
103     liveins: $sgpr0, $sgpr1, $sgpr2
105     ; GCN-LABEL: name: test_merge_values_s_s96_s_s32_s_s32_s_s32
106     ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2
107     ; GCN-NEXT: {{  $}}
108     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
109     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
110     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
111     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
112     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2 = COPY [[REG_SEQUENCE]]
113     %0:sgpr(s32) = COPY $sgpr0
114     %1:sgpr(s32) = COPY $sgpr1
115     %2:sgpr(s32) = COPY $sgpr2
116     %3:sgpr(s96) = G_MERGE_VALUES %0, %1, %2
117     $sgpr0_sgpr1_sgpr2 = COPY %3
121 name: test_merge_values_v_s96_v_s32_v_s32_v_s32
122 legalized:       true
123 regBankSelected: true
124 tracksRegLiveness: true
126 body: |
127   bb.0:
128     liveins: $vgpr0, $vgpr1, $vgpr2
130     ; GCN-LABEL: name: test_merge_values_v_s96_v_s32_v_s32_v_s32
131     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2
132     ; GCN-NEXT: {{  $}}
133     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
134     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
135     ; GCN-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
136     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_96 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2
137     ; GCN-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[REG_SEQUENCE]]
138     %0:vgpr(s32) = COPY $vgpr0
139     %1:vgpr(s32) = COPY $vgpr1
140     %2:vgpr(s32) = COPY $vgpr2
141     %3:vgpr(s96) = G_MERGE_VALUES %0, %1, %2
142     $vgpr0_vgpr1_vgpr2 = COPY %3
146 name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
147 legalized:       true
148 regBankSelected: true
149 tracksRegLiveness: true
151 body: |
152   bb.0:
153     liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
155     ; GCN-LABEL: name: test_merge_values_s_s128_s_s32_s_s32_s_s32_s_s32
156     ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
157     ; GCN-NEXT: {{  $}}
158     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
159     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
160     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
161     ; GCN-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY $sgpr3
162     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
163     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
164     %0:sgpr(s32) = COPY $sgpr0
165     %1:sgpr(s32) = COPY $sgpr1
166     %2:sgpr(s32) = COPY $sgpr2
167     %3:sgpr(s32) = COPY $sgpr3
168     %4:sgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
169     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
173 name: test_merge_values_v_s128_v_s32_v_s32_v_s32
174 legalized:       true
175 regBankSelected: true
176 tracksRegLiveness: true
178 body: |
179   bb.0:
180     liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
182     ; GCN-LABEL: name: test_merge_values_v_s128_v_s32_v_s32_v_s32
183     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
184     ; GCN-NEXT: {{  $}}
185     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
186     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
187     ; GCN-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
188     ; GCN-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
189     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3
190     ; GCN-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
191     %0:vgpr(s32) = COPY $vgpr0
192     %1:vgpr(s32) = COPY $vgpr1
193     %2:vgpr(s32) = COPY $vgpr2
194     %3:vgpr(s32) = COPY $vgpr3
195     %4:vgpr(s128) = G_MERGE_VALUES %0, %1, %2, %3
196     $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
200 name: test_merge_values_s_s128_s_s64_s_s64
201 legalized:       true
202 regBankSelected: true
203 tracksRegLiveness: true
205 body: |
206   bb.0:
207     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
209     ; GCN-LABEL: name: test_merge_values_s_s128_s_s64_s_s64
210     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
211     ; GCN-NEXT: {{  $}}
212     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
213     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
214     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
215     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3 = COPY [[REG_SEQUENCE]]
216     %0:sgpr(s64) = COPY $sgpr0_sgpr1
217     %1:sgpr(s64) = COPY $sgpr2_sgpr3
218     %4:sgpr(s128) = G_MERGE_VALUES %0, %1
219     $sgpr0_sgpr1_sgpr2_sgpr3 = COPY %4
223 name: test_merge_values_v_s128_v_s64_v_s64
224 legalized:       true
225 regBankSelected: true
226 tracksRegLiveness: true
228 body: |
229   bb.0:
230     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
232     ; GCN-LABEL: name: test_merge_values_v_s128_v_s64_v_s64
233     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
234     ; GCN-NEXT: {{  $}}
235     ; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
236     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
237     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_128 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3
238     ; GCN-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[REG_SEQUENCE]]
239     %0:vgpr(s64) = COPY $vgpr0_vgpr1
240     %1:vgpr(s64) = COPY $vgpr2_vgpr3
241     %2:vgpr(s128) = G_MERGE_VALUES %0, %1
242     $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
246 name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
247 legalized:       true
248 regBankSelected: true
249 tracksRegLiveness: true
251 body: |
252   bb.0:
253     liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
255     ; GCN-LABEL: name: test_merge_values_s_s160_s_s32_s_s32_s_s32_s_s32_s_s32
256     ; GCN: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3, $sgpr4
257     ; GCN-NEXT: {{  $}}
258     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_32 = COPY $sgpr0
259     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_32 = COPY $sgpr1
260     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_32 = COPY $sgpr2
261     ; GCN-NEXT: [[COPY3:%[0-9]+]]:sreg_32 = COPY $sgpr3
262     ; GCN-NEXT: [[COPY4:%[0-9]+]]:sreg_32 = COPY $sgpr4
263     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
264     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY [[REG_SEQUENCE]]
265     %0:sgpr(s32) = COPY $sgpr0
266     %1:sgpr(s32) = COPY $sgpr1
267     %2:sgpr(s32) = COPY $sgpr2
268     %3:sgpr(s32) = COPY $sgpr3
269     %4:sgpr(s32) = COPY $sgpr4
270     %5:sgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
271     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4 = COPY %5
275 name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
276 legalized:       true
277 regBankSelected: true
278 tracksRegLiveness: true
280 body: |
281   bb.0:
282     liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
284     ; GCN-LABEL: name: test_merge_values_v_s160_v_s32_v_s32_v_s32_v_s32_v_s32
285     ; GCN: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4
286     ; GCN-NEXT: {{  $}}
287     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
288     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
289     ; GCN-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
290     ; GCN-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr3
291     ; GCN-NEXT: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr4
292     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_160 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1, [[COPY2]], %subreg.sub2, [[COPY3]], %subreg.sub3, [[COPY4]], %subreg.sub4
293     ; GCN-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY [[REG_SEQUENCE]]
294     %0:vgpr(s32) = COPY $vgpr0
295     %1:vgpr(s32) = COPY $vgpr1
296     %2:vgpr(s32) = COPY $vgpr2
297     %3:vgpr(s32) = COPY $vgpr3
298     %4:vgpr(s32) = COPY $vgpr4
299     %5:vgpr(s160) = G_MERGE_VALUES %0, %1, %2, %3, %4
300     $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4 = COPY %5
304 name: test_merge_values_s_s192_s_s64_s_s64_s_s64
305 legalized:       true
306 regBankSelected: true
307 tracksRegLiveness: true
309 body: |
310   bb.0:
311     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
313     ; GCN-LABEL: name: test_merge_values_s_s192_s_s64_s_s64_s_s64
314     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5
315     ; GCN-NEXT: {{  $}}
316     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
317     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
318     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
319     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_192 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5
320     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
321     %0:sgpr(s64) = COPY $sgpr0_sgpr1
322     %1:sgpr(s64) = COPY $sgpr2_sgpr3
323     %2:sgpr(s64) = COPY $sgpr4_sgpr5
324     %3:sgpr(s192) = G_MERGE_VALUES %0, %1, %2
325     S_ENDPGM 0, implicit %3
329 name: test_merge_values_v_s192_v_s64_v_s64_v_s64
330 legalized:       true
331 regBankSelected: true
332 tracksRegLiveness: true
334 body: |
335   bb.0:
336     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
338     ; GCN-LABEL: name: test_merge_values_v_s192_v_s64_v_s64_v_s64
339     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
340     ; GCN-NEXT: {{  $}}
341     ; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
342     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
343     ; GCN-NEXT: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr4_vgpr5
344     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_192 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5
345     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
346     %0:vgpr(s64) = COPY $vgpr0_vgpr1
347     %1:vgpr(s64) = COPY $vgpr2_vgpr3
348     %2:vgpr(s64) = COPY $vgpr4_vgpr5
349     %3:vgpr(s192) = G_MERGE_VALUES %0, %1, %2
350     S_ENDPGM 0, implicit %3
354 name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
355 legalized:       true
356 regBankSelected: true
357 tracksRegLiveness: true
359 body: |
360   bb.0:
361     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
363     ; GCN-LABEL: name: test_merge_values_s_s256_s_s64_s_s64_s_s64_s_s64
364     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7
365     ; GCN-NEXT: {{  $}}
366     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
367     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
368     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
369     ; GCN-NEXT: [[COPY3:%[0-9]+]]:sreg_64 = COPY $sgpr6_sgpr7
370     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1, [[COPY1]], %subreg.sub2_sub3, [[COPY2]], %subreg.sub4_sub5, [[COPY3]], %subreg.sub6_sub7
371     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
372     %0:sgpr(s64) = COPY $sgpr0_sgpr1
373     %1:sgpr(s64) = COPY $sgpr2_sgpr3
374     %2:sgpr(s64) = COPY $sgpr4_sgpr5
375     %3:sgpr(s64) = COPY $sgpr6_sgpr7
376     %4:sgpr(s256) = G_MERGE_VALUES %0, %1, %2, %3
377     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %4
381 name: test_merge_values_s_s256_s_s128_s_s128
382 legalized:       true
383 regBankSelected: true
384 tracksRegLiveness: true
386 body: |
387   bb.0:
388     liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
390     ; GCN-LABEL: name: test_merge_values_s_s256_s_s128_s_s128
391     ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4_sgpr5_sgpr6_sgpr7
392     ; GCN-NEXT: {{  $}}
393     ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_128 = COPY $sgpr0_sgpr1_sgpr2_sgpr3
394     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_128 = COPY $sgpr4_sgpr5_sgpr6_sgpr7
395     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:sgpr_256 = REG_SEQUENCE [[COPY]], %subreg.sub0_sub1_sub2_sub3, [[COPY1]], %subreg.sub4_sub5_sub6_sub7
396     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY [[REG_SEQUENCE]]
397     %0:sgpr(s128) = COPY $sgpr0_sgpr1_sgpr2_sgpr3
398     %1:sgpr(s128) = COPY $sgpr4_sgpr5_sgpr6_sgpr7
399     %2:sgpr(s256) = G_MERGE_VALUES %0, %1
400     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7 = COPY %2
404 name: test_merge_values_s_s512_s_s256_s_s256
405 legalized:       true
406 regBankSelected: true
407 tracksRegLiveness: true
409 body: |
410   bb.0:
411     liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
413     ; GCN-LABEL: name: test_merge_values_s_s512_s_s256_s_s256
414     ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
415     ; GCN-NEXT: {{  $}}
416     ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
417     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_256 = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
418     ; GCN-NEXT: [[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
419     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
420     %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7,
421     %1:sgpr(s256) = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
422     %4:sgpr(s512) = G_MERGE_VALUES %0, %1
423     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %4
427 name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
428 legalized:       true
429 regBankSelected: true
430 tracksRegLiveness: true
432 body: |
433   bb.0:
434     liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
436     ; GCN-LABEL: name: test_merge_values_s_s512_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64_s_s64
437     ; GCN: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $sgpr4_sgpr5, $sgpr6_sgpr7, $sgpr8_sgpr9, $sgpr10_sgpr11, $sgpr12_sgpr13, $sgpr14_sgpr15
438     ; GCN-NEXT: {{  $}}
439     ; GCN-NEXT: [[COPY:%[0-9]+]]:sreg_64 = COPY $sgpr0_sgpr1
440     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sreg_64 = COPY $sgpr2_sgpr3
441     ; GCN-NEXT: [[COPY2:%[0-9]+]]:sreg_64 = COPY $sgpr4_sgpr5
442     ; GCN-NEXT: [[COPY3:%[0-9]+]]:sreg_64 = COPY $sgpr6_sgpr7
443     ; GCN-NEXT: [[COPY4:%[0-9]+]]:sreg_64 = COPY $sgpr8_sgpr9
444     ; GCN-NEXT: [[COPY5:%[0-9]+]]:sreg_64 = COPY $sgpr10_sgpr11
445     ; GCN-NEXT: [[COPY6:%[0-9]+]]:sreg_64 = COPY $sgpr12_sgpr13
446     ; GCN-NEXT: [[COPY7:%[0-9]+]]:sreg_64 = COPY $sgpr14_sgpr15
447     ; GCN-NEXT: [[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
448     ; GCN-NEXT: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY [[REG_SEQUENCE]]
449     %0:sgpr(s64) = COPY $sgpr0_sgpr1
450     %1:sgpr(s64) = COPY $sgpr2_sgpr3
451     %2:sgpr(s64) = COPY $sgpr4_sgpr5
452     %3:sgpr(s64) = COPY $sgpr6_sgpr7
453     %4:sgpr(s64) = COPY $sgpr8_sgpr9
454     %5:sgpr(s64) = COPY $sgpr10_sgpr11
455     %6:sgpr(s64) = COPY $sgpr12_sgpr13
456     %7:sgpr(s64) = COPY $sgpr14_sgpr15
457     %8:sgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
458     $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15 = COPY %8
462 name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
463 legalized:       true
464 regBankSelected: true
465 tracksRegLiveness: true
467 body: |
468   bb.0:
469     liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
471     ; GCN-LABEL: name: test_merge_values_v_v512_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64_v_s64
472     ; GCN: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5, $vgpr6_vgpr7, $vgpr8_vgpr9, $vgpr10_vgpr11, $vgpr12_vgpr13, $vgpr14_vgpr15
473     ; GCN-NEXT: {{  $}}
474     ; GCN-NEXT: [[COPY:%[0-9]+]]:vreg_64 = COPY $vgpr0_vgpr1
475     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vreg_64 = COPY $vgpr2_vgpr3
476     ; GCN-NEXT: [[COPY2:%[0-9]+]]:vreg_64 = COPY $vgpr4_vgpr5
477     ; GCN-NEXT: [[COPY3:%[0-9]+]]:vreg_64 = COPY $vgpr6_vgpr7
478     ; GCN-NEXT: [[COPY4:%[0-9]+]]:vreg_64 = COPY $vgpr8_vgpr9
479     ; GCN-NEXT: [[COPY5:%[0-9]+]]:vreg_64 = COPY $vgpr10_vgpr11
480     ; GCN-NEXT: [[COPY6:%[0-9]+]]:vreg_64 = COPY $vgpr12_vgpr13
481     ; GCN-NEXT: [[COPY7:%[0-9]+]]:vreg_64 = COPY $vgpr14_vgpr15
482     ; GCN-NEXT: [[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
483     ; GCN-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[REG_SEQUENCE]]
484     %0:vgpr(s64) = COPY $vgpr0_vgpr1
485     %1:vgpr(s64) = COPY $vgpr2_vgpr3
486     %2:vgpr(s64) = COPY $vgpr4_vgpr5
487     %3:vgpr(s64) = COPY $vgpr6_vgpr7
488     %4:vgpr(s64) = COPY $vgpr8_vgpr9
489     %5:vgpr(s64) = COPY $vgpr10_vgpr11
490     %6:vgpr(s64) = COPY $vgpr12_vgpr13
491     %7:vgpr(s64) = COPY $vgpr14_vgpr15
492     %8:vgpr(s512) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
493     $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %8
497 name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
498 legalized:       true
499 regBankSelected: true
500 tracksRegLiveness: true
502 body: |
503   bb.0:
504     liveins: $vgpr0, $vgpr1
506     ; GCN-LABEL: name: test_merge_values_rc_already_set_src_v_s64_v_s32_v_s32
507     ; GCN: liveins: $vgpr0, $vgpr1
508     ; GCN-NEXT: {{  $}}
509     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
510     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
511     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
512     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
513     %0:vgpr_32(s32) = COPY $vgpr0
514     %1:vgpr_32(s32) = COPY $vgpr1
515     %2:vgpr(s64) = G_MERGE_VALUES %0, %1
516     S_ENDPGM 0, implicit %2
520 name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
521 legalized:       true
522 regBankSelected: true
523 tracksRegLiveness: true
525 body: |
526   bb.0:
527     liveins: $vgpr0, $vgpr1
529     ; GCN-LABEL: name: test_merge_values_rc_already_set_dst_v_s64_v_s32_v_s32
530     ; GCN: liveins: $vgpr0, $vgpr1
531     ; GCN-NEXT: {{  $}}
532     ; GCN-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
533     ; GCN-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr1
534     ; GCN-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY]], %subreg.sub0, [[COPY1]], %subreg.sub1
535     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
536     %0:vgpr(s32) = COPY $vgpr0
537     %1:vgpr(s32) = COPY $vgpr1
538     %2:vreg_64(s64) = G_MERGE_VALUES %0, %1
539     S_ENDPGM 0, implicit %2
543 name: test_merge_values_s_s1024_s_s256_s_s256_s_s256_s_s256
544 legalized:       true
545 regBankSelected: true
546 tracksRegLiveness: true
548 body: |
549   bb.0:
550     liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
552     ; GCN-LABEL: name: test_merge_values_s_s1024_s_s256_s_s256_s_s256_s_s256
553     ; GCN: liveins: $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7, $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
554     ; GCN-NEXT: {{  $}}
555     ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_256 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7
556     ; GCN-NEXT: [[DEF:%[0-9]+]]:sgpr_256 = IMPLICIT_DEF
557     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_256 = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
558     ; GCN-NEXT: [[DEF1:%[0-9]+]]:sgpr_256 = IMPLICIT_DEF
559     ; GCN-NEXT: [[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
560     ; GCN-NEXT: S_ENDPGM 0, implicit [[REG_SEQUENCE]]
561     %0:sgpr(s256) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7,
562     %1:sgpr(s256) = G_IMPLICIT_DEF
563     %2:sgpr(s256) = COPY $sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
564     %3:sgpr(s256) = G_IMPLICIT_DEF
565     %4:sgpr(s1024) = G_MERGE_VALUES %0, %1, %2, %3
566     S_ENDPGM 0, implicit %4
571 name: test_merge_values_s_s1024_s_s512
572 legalized:       true
573 regBankSelected: true
574 tracksRegLiveness: true
576 body: |
577   bb.0:
578     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
580     ; GCN-LABEL: name: test_merge_values_s_s1024_s_s512
581     ; 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
582     ; GCN-NEXT: {{  $}}
583     ; GCN-NEXT: [[COPY:%[0-9]+]]:sgpr_512 = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
584     ; GCN-NEXT: [[COPY1:%[0-9]+]]:sgpr_512 = COPY $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
585     ; GCN-NEXT: [[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
586     ; GCN-NEXT: $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]]
587     %0:sgpr(s512) = COPY $sgpr0_sgpr1_sgpr2_sgpr3_sgpr4_sgpr5_sgpr6_sgpr7_sgpr8_sgpr9_sgpr10_sgpr11_sgpr12_sgpr13_sgpr14_sgpr15
588     %1:sgpr(s512) = COPY $sgpr16_sgpr17_sgpr18_sgpr19_sgpr20_sgpr21_sgpr22_sgpr23_sgpr24_sgpr25_sgpr26_sgpr27_sgpr28_sgpr29_sgpr30_sgpr31
589     %2:sgpr(s1024) = G_MERGE_VALUES %0, %1
590     $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