• 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 -O0 -run-pass=legalizer -global-isel-abort=2 -pass-remarks-missed='gisel*' -o - %s 2> %t  | FileCheck %s
3# FileCheck -check-prefix=ERR %s < %t
4
5# ERR-NOT: remark:
6# ERR: remark: <unknown>:0:0: unable to legalize instruction: %197:_(s136) = G_INSERT %209:_, %206:_(s8), 128 (in function: test_merge_s68_s17_s17_s17_s17)
7# ERR-NOT: remark:
8
9
10---
11name: test_merge_p1_s8
12body: |
13  bb.0:
14    liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3, $vgpr4, $vgpr5, $vgpr6, $vgpr7
15    ; CHECK-LABEL: name: test_merge_p1_s8
16    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
17    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
18    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
19    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr3
20    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY $vgpr4
21    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY $vgpr5
22    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY $vgpr6
23    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY $vgpr7
24    ; CHECK: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
25    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
26    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[C]]
27    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
28    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
29    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
30    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
31    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY9]], [[C2]]
32    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY8]](s32)
33    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
34    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC1]]
35    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[COPY2]](s32)
36    ; CHECK: [[AND2:%[0-9]+]]:_(s16) = G_AND [[TRUNC2]], [[C]]
37    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
38    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[COPY3]](s32)
39    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY11]], [[C2]]
40    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY10]](s32)
41    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
42    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC3]]
43    ; CHECK: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[COPY4]](s32)
44    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[TRUNC4]], [[C]]
45    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
46    ; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY5]](s32)
47    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY13]], [[C2]]
48    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY12]](s32)
49    ; CHECK: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
50    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC5]]
51    ; CHECK: [[TRUNC6:%[0-9]+]]:_(s16) = G_TRUNC [[COPY6]](s32)
52    ; CHECK: [[AND6:%[0-9]+]]:_(s16) = G_AND [[TRUNC6]], [[C]]
53    ; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY7]](s32)
54    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[C2]]
55    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C1]](s32)
56    ; CHECK: [[TRUNC7:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
57    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND6]], [[TRUNC7]]
58    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
59    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
60    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
61    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C3]](s32)
62    ; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL4]]
63    ; CHECK: [[ZEXT2:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
64    ; CHECK: [[ZEXT3:%[0-9]+]]:_(s32) = G_ZEXT [[OR3]](s16)
65    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[ZEXT3]], [[C3]](s32)
66    ; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[ZEXT2]], [[SHL5]]
67    ; CHECK: [[MV:%[0-9]+]]:_(p1) = G_MERGE_VALUES [[OR4]](s32), [[OR5]](s32)
68    ; CHECK: $vgpr0_vgpr1 = COPY [[MV]](p1)
69    %0:_(s32) = COPY $vgpr0
70    %1:_(s32) = COPY $vgpr1
71    %2:_(s32) = COPY $vgpr2
72    %3:_(s32) = COPY $vgpr3
73    %4:_(s32) = COPY $vgpr4
74    %5:_(s32) = COPY $vgpr5
75    %6:_(s32) = COPY $vgpr6
76    %7:_(s32) = COPY $vgpr7
77    %8:_(s8) = G_TRUNC %0
78    %9:_(s8) = G_TRUNC %1
79    %10:_(s8) = G_TRUNC %2
80    %11:_(s8) = G_TRUNC %3
81    %12:_(s8) = G_TRUNC %4
82    %13:_(s8) = G_TRUNC %5
83    %14:_(s8) = G_TRUNC %6
84    %15:_(s8) = G_TRUNC %7
85    %16:_(p1) = G_MERGE_VALUES %8, %9, %10, %11, %12, %13, %14, %15
86    $vgpr0_vgpr1 = COPY %16
87
88...
89
90---
91name: test_merge_s16_s8_s8
92body: |
93  bb.0:
94    ; CHECK-LABEL: name: test_merge_s16_s8_s8
95    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
96    ; CHECK: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
97    ; CHECK: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
98    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C2]], [[C1]]
99    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
100    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
101    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
102    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C4]]
103    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C3]](s32)
104    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
105    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
106    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[OR]](s16)
107    ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
108    %0:_(s8) = G_CONSTANT i8 0
109    %1:_(s8) = G_CONSTANT i8 1
110    %2:_(s16) = G_MERGE_VALUES %0, %1
111    %3:_(s32) = G_ANYEXT %2
112    $vgpr0 = COPY %3
113...
114
115---
116name: test_merge_s24_s8_s8_s8
117body: |
118  bb.0:
119    ; CHECK-LABEL: name: test_merge_s24_s8_s8_s8
120    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
121    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
122    ; CHECK: [[C1:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
123    ; CHECK: [[C2:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
124    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C2]], [[C1]]
125    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
126    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
127    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
128    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
129    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C4]]
130    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
131    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
132    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
133    ; CHECK: [[C5:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
134    ; CHECK: [[AND2:%[0-9]+]]:_(s16) = G_AND [[C5]], [[C1]]
135    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
136    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C4]]
137    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C3]](s32)
138    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
139    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC1]]
140    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
141    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
142    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
143    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C6]](s32)
144    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL2]]
145    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[OR2]](s32)
146    ; CHECK: $vgpr0 = COPY [[COPY3]](s32)
147    %0:_(s8) = G_CONSTANT i8 0
148    %1:_(s8) = G_CONSTANT i8 1
149    %2:_(s8) = G_CONSTANT i8 2
150    %3:_(s24) = G_MERGE_VALUES %0, %1, %2
151    %4:_(s32) = G_ANYEXT %3
152    $vgpr0 = COPY %4
153...
154
155---
156name: test_merge_s32_s8_s8_s8_s8
157body: |
158  bb.0:
159    ; CHECK-LABEL: name: test_merge_s32_s8_s8_s8_s8
160    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
161    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
162    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
163    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
164    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
165    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
166    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C4]]
167    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
168    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C4]]
169    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
170    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C5]](s32)
171    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
172    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
173    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C4]]
174    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
175    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C6]](s32)
176    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
177    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
178    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C4]]
179    ; CHECK: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
180    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C7]](s32)
181    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[OR1]], [[SHL2]]
182    ; CHECK: $vgpr0 = COPY [[OR2]](s32)
183    %0:_(s8) = G_CONSTANT i8 0
184    %1:_(s8) = G_CONSTANT i8 1
185    %2:_(s8) = G_CONSTANT i8 2
186    %3:_(s8) = G_CONSTANT i8 3
187    %4:_(s32) = G_MERGE_VALUES %0, %1, %2, %3
188    $vgpr0 = COPY %4
189...
190
191---
192name: test_merge_s64_s32_s32
193body: |
194  bb.0:
195    liveins: $vgpr0, $vgpr1
196    ; CHECK-LABEL: name: test_merge_s64_s32_s32
197    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
198    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
199    ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
200    ; CHECK: $vgpr1_vgpr2 = COPY [[MV]](s64)
201    %0:_(s32) = COPY $vgpr0
202    %1:_(s32) = COPY $vgpr1
203    %2:_(s64) = G_MERGE_VALUES %0, %1
204    $vgpr1_vgpr2 = COPY %2
205...
206
207---
208name: test_merge_s64_s16_s16_s16_s16
209body: |
210  bb.0:
211    liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
212    ; CHECK-LABEL: name: test_merge_s64_s16_s16_s16_s16
213    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
214    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
215    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
216    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY $vgpr3
217    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
218    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
219    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C]]
220    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
221    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C]]
222    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
223    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
224    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
225    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
226    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C]]
227    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[COPY3]](s32)
228    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C]]
229    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C1]](s32)
230    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
231    ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
232    ; CHECK: $vgpr1_vgpr2 = COPY [[MV]](s64)
233    %0:_(s32) = COPY $vgpr0
234    %1:_(s32) = COPY $vgpr1
235    %2:_(s32) = COPY $vgpr2
236    %3:_(s32) = COPY $vgpr3
237    %4:_(s16) = G_TRUNC %0
238    %5:_(s16) = G_TRUNC %1
239    %6:_(s16) = G_TRUNC %2
240    %7:_(s16) = G_TRUNC %3
241    %8:_(s64) = G_MERGE_VALUES %4, %5, %6, %7
242    $vgpr1_vgpr2 = COPY %8
243...
244
245---
246
247name: test_merge_s24_s4_s4_s4_s4_s4_s4
248body: |
249  bb.0:
250    ; CHECK-LABEL: name: test_merge_s24_s4_s4_s4_s4_s4_s4
251    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
252    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
253    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
254    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
255    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
256    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
257    ; CHECK: [[C5:%[0-9]+]]:_(s16) = G_CONSTANT i16 15
258    ; CHECK: [[C6:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
259    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C6]], [[C5]]
260    ; CHECK: [[C7:%[0-9]+]]:_(s16) = G_CONSTANT i16 4
261    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
262    ; CHECK: [[C8:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
263    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
264    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C8]]
265    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
266    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
267    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
268    ; CHECK: [[C9:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
269    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C9]](s32)
270    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
271    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C8]]
272    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[COPY2]](s32)
273    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
274    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[OR]], [[TRUNC1]]
275    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
276    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C10]](s32)
277    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
278    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C8]]
279    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY4]](s32)
280    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
281    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[OR1]], [[TRUNC2]]
282    ; CHECK: [[COPY6:%[0-9]+]]:_(s16) = COPY [[C7]](s16)
283    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[COPY6]], [[C5]]
284    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
285    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
286    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C8]]
287    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY7]](s32)
288    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
289    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC3]]
290    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
291    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY9]], [[C8]]
292    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C9]](s32)
293    ; CHECK: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[SHL4]](s32)
294    ; CHECK: [[OR4:%[0-9]+]]:_(s16) = G_OR [[OR3]], [[TRUNC4]]
295    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
296    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[C8]]
297    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C10]](s32)
298    ; CHECK: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[SHL5]](s32)
299    ; CHECK: [[OR5:%[0-9]+]]:_(s16) = G_OR [[OR4]], [[TRUNC5]]
300    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
301    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR5]](s16)
302    ; CHECK: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
303    ; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C11]](s32)
304    ; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL6]]
305    ; CHECK: [[TRUNC6:%[0-9]+]]:_(s24) = G_TRUNC [[OR6]](s32)
306    ; CHECK: S_NOP 0, implicit [[TRUNC6]](s24)
307    %0:_(s4) = G_CONSTANT i4 0
308    %1:_(s4) = G_CONSTANT i4 1
309    %2:_(s4) = G_CONSTANT i4 2
310    %3:_(s4) = G_CONSTANT i4 3
311    %4:_(s4) = G_CONSTANT i4 4
312    %5:_(s4) = G_CONSTANT i4 5
313    %6:_(s24) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5
314    S_NOP 0, implicit %6
315...
316
317---
318name: test_merge_s28_s4_s4_s4_s4_s4_s4_s4
319body: |
320  bb.0:
321    ; CHECK-LABEL: name: test_merge_s28_s4_s4_s4_s4_s4_s4_s4
322    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
323    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
324    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
325    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
326    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
327    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 6
328    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
329    ; CHECK: [[C6:%[0-9]+]]:_(s16) = G_CONSTANT i16 15
330    ; CHECK: [[C7:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
331    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C7]], [[C6]]
332    ; CHECK: [[C8:%[0-9]+]]:_(s16) = G_CONSTANT i16 4
333    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
334    ; CHECK: [[C9:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
335    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
336    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C9]]
337    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
338    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
339    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
340    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
341    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C10]](s32)
342    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
343    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C9]]
344    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[COPY2]](s32)
345    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
346    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[OR]], [[TRUNC1]]
347    ; CHECK: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
348    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C11]](s32)
349    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
350    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C9]]
351    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY4]](s32)
352    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
353    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[OR1]], [[TRUNC2]]
354    ; CHECK: [[COPY6:%[0-9]+]]:_(s16) = COPY [[C8]](s16)
355    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[COPY6]], [[C6]]
356    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
357    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
358    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C9]]
359    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY7]](s32)
360    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
361    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC3]]
362    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
363    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY9]], [[C9]]
364    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C10]](s32)
365    ; CHECK: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[SHL4]](s32)
366    ; CHECK: [[OR4:%[0-9]+]]:_(s16) = G_OR [[OR3]], [[TRUNC4]]
367    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
368    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[C9]]
369    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C11]](s32)
370    ; CHECK: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[SHL5]](s32)
371    ; CHECK: [[OR5:%[0-9]+]]:_(s16) = G_OR [[OR4]], [[TRUNC5]]
372    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
373    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR5]](s16)
374    ; CHECK: [[C12:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
375    ; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C12]](s32)
376    ; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL6]]
377    ; CHECK: [[TRUNC6:%[0-9]+]]:_(s28) = G_TRUNC [[OR6]](s32)
378    ; CHECK: S_NOP 0, implicit [[TRUNC6]](s28)
379    %0:_(s4) = G_CONSTANT i4 0
380    %1:_(s4) = G_CONSTANT i4 1
381    %2:_(s4) = G_CONSTANT i4 2
382    %3:_(s4) = G_CONSTANT i4 3
383    %4:_(s4) = G_CONSTANT i4 4
384    %5:_(s4) = G_CONSTANT i4 5
385    %6:_(s4) = G_CONSTANT i4 6
386    %7:_(s28) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6
387    S_NOP 0, implicit %7
388...
389
390---
391name: test_merge_s32_s4_s4_s4_s4_s4_s4_s4_s4
392body: |
393  bb.0:
394    ; CHECK-LABEL: name: test_merge_s32_s4_s4_s4_s4_s4_s4_s4_s4
395    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
396    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
397    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
398    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
399    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
400    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
401    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 6
402    ; CHECK: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
403    ; CHECK: [[C8:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
404    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
405    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C8]]
406    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
407    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C8]]
408    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C4]](s32)
409    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
410    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
411    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C8]]
412    ; CHECK: [[C9:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
413    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C9]](s32)
414    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
415    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
416    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C8]]
417    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
418    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C10]](s32)
419    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[OR1]], [[SHL2]]
420    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
421    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C8]]
422    ; CHECK: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
423    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND4]], [[C11]](s32)
424    ; CHECK: [[OR3:%[0-9]+]]:_(s32) = G_OR [[OR2]], [[SHL3]]
425    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
426    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C8]]
427    ; CHECK: [[C12:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
428    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C12]](s32)
429    ; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[OR3]], [[SHL4]]
430    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C6]](s32)
431    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C8]]
432    ; CHECK: [[C13:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
433    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C13]](s32)
434    ; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[OR4]], [[SHL5]]
435    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C7]](s32)
436    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C8]]
437    ; CHECK: [[C14:%[0-9]+]]:_(s32) = G_CONSTANT i32 28
438    ; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C14]](s32)
439    ; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[OR5]], [[SHL6]]
440    ; CHECK: S_NOP 0, implicit [[OR6]](s32)
441    %0:_(s4) = G_CONSTANT i4 0
442    %1:_(s4) = G_CONSTANT i4 1
443    %2:_(s4) = G_CONSTANT i4 2
444    %3:_(s4) = G_CONSTANT i4 3
445    %4:_(s4) = G_CONSTANT i4 4
446    %5:_(s4) = G_CONSTANT i4 5
447    %6:_(s4) = G_CONSTANT i4 6
448    %7:_(s4) = G_CONSTANT i4 7
449    %8:_(s32) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
450    S_NOP 0, implicit %8
451...
452
453---
454name: test_merge_s64_s8_s8_s8_s8_s8_s8_s8_s8
455body: |
456  bb.0:
457    ; CHECK-LABEL: name: test_merge_s64_s8_s8_s8_s8_s8_s8_s8_s8
458    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
459    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
460    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
461    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
462    ; CHECK: [[C4:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
463    ; CHECK: [[C5:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
464    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C5]], [[C4]]
465    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
466    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C6]](s32)
467    ; CHECK: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
468    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
469    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C7]]
470    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
471    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
472    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
473    ; CHECK: [[C8:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
474    ; CHECK: [[AND2:%[0-9]+]]:_(s16) = G_AND [[C8]], [[C4]]
475    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C6]](s32)
476    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
477    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C7]]
478    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY2]](s32)
479    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
480    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC1]]
481    ; CHECK: [[C9:%[0-9]+]]:_(s16) = G_CONSTANT i16 4
482    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[C9]], [[C4]]
483    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C6]](s32)
484    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
485    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C7]]
486    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY4]](s32)
487    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
488    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC2]]
489    ; CHECK: [[C10:%[0-9]+]]:_(s16) = G_CONSTANT i16 6
490    ; CHECK: [[AND6:%[0-9]+]]:_(s16) = G_AND [[C10]], [[C4]]
491    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
492    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C7]]
493    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C6]](s32)
494    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
495    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND6]], [[TRUNC3]]
496    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
497    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
498    ; CHECK: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
499    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C11]](s32)
500    ; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL4]]
501    ; CHECK: [[ZEXT2:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
502    ; CHECK: [[ZEXT3:%[0-9]+]]:_(s32) = G_ZEXT [[OR3]](s16)
503    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[ZEXT3]], [[C11]](s32)
504    ; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[ZEXT2]], [[SHL5]]
505    ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR4]](s32), [[OR5]](s32)
506    ; CHECK: $vgpr0_vgpr1 = COPY [[MV]](s64)
507    %0:_(s8) = G_CONSTANT i8 0
508    %1:_(s8) = G_CONSTANT i8 1
509    %2:_(s8) = G_CONSTANT i8 2
510    %3:_(s8) = G_CONSTANT i8 3
511    %4:_(s8) = G_CONSTANT i8 4
512    %5:_(s8) = G_CONSTANT i8 5
513    %6:_(s8) = G_CONSTANT i8 6
514    %7:_(s8) = G_CONSTANT i8 7
515    %8:_(s64) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7
516    $vgpr0_vgpr1 = COPY %8
517...
518
519---
520name: test_merge_s96_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8
521body: |
522  bb.0:
523    ; CHECK-LABEL: name: test_merge_s96_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8_s8
524    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
525    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
526    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
527    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
528    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
529    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 9
530    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 11
531    ; CHECK: [[C7:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
532    ; CHECK: [[C8:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
533    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C8]], [[C7]]
534    ; CHECK: [[C9:%[0-9]+]]:_(s16) = G_CONSTANT i16 8
535    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
536    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
537    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
538    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C10]]
539    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
540    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
541    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
542    ; CHECK: [[C11:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
543    ; CHECK: [[AND2:%[0-9]+]]:_(s16) = G_AND [[C11]], [[C7]]
544    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
545    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
546    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C10]]
547    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY2]](s32)
548    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
549    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC1]]
550    ; CHECK: [[C12:%[0-9]+]]:_(s16) = G_CONSTANT i16 4
551    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[C12]], [[C7]]
552    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
553    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
554    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C10]]
555    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY4]](s32)
556    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
557    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC2]]
558    ; CHECK: [[C13:%[0-9]+]]:_(s16) = G_CONSTANT i16 6
559    ; CHECK: [[AND6:%[0-9]+]]:_(s16) = G_AND [[C13]], [[C7]]
560    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
561    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
562    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C10]]
563    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[COPY6]](s32)
564    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
565    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND6]], [[TRUNC3]]
566    ; CHECK: [[COPY8:%[0-9]+]]:_(s16) = COPY [[C9]](s16)
567    ; CHECK: [[AND8:%[0-9]+]]:_(s16) = G_AND [[COPY8]], [[C7]]
568    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
569    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
570    ; CHECK: [[AND9:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[C10]]
571    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND9]], [[COPY9]](s32)
572    ; CHECK: [[TRUNC4:%[0-9]+]]:_(s16) = G_TRUNC [[SHL4]](s32)
573    ; CHECK: [[OR4:%[0-9]+]]:_(s16) = G_OR [[AND8]], [[TRUNC4]]
574    ; CHECK: [[C14:%[0-9]+]]:_(s16) = G_CONSTANT i16 10
575    ; CHECK: [[AND10:%[0-9]+]]:_(s16) = G_AND [[C14]], [[C7]]
576    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[C4]](s32)
577    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[C6]](s32)
578    ; CHECK: [[AND11:%[0-9]+]]:_(s32) = G_AND [[COPY12]], [[C10]]
579    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND11]], [[COPY11]](s32)
580    ; CHECK: [[TRUNC5:%[0-9]+]]:_(s16) = G_TRUNC [[SHL5]](s32)
581    ; CHECK: [[OR5:%[0-9]+]]:_(s16) = G_OR [[AND10]], [[TRUNC5]]
582    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
583    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
584    ; CHECK: [[C15:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
585    ; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C15]](s32)
586    ; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL6]]
587    ; CHECK: [[ZEXT2:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
588    ; CHECK: [[ZEXT3:%[0-9]+]]:_(s32) = G_ZEXT [[OR3]](s16)
589    ; CHECK: [[SHL7:%[0-9]+]]:_(s32) = G_SHL [[ZEXT3]], [[C15]](s32)
590    ; CHECK: [[OR7:%[0-9]+]]:_(s32) = G_OR [[ZEXT2]], [[SHL7]]
591    ; CHECK: [[ZEXT4:%[0-9]+]]:_(s32) = G_ZEXT [[OR4]](s16)
592    ; CHECK: [[ZEXT5:%[0-9]+]]:_(s32) = G_ZEXT [[OR5]](s16)
593    ; CHECK: [[SHL8:%[0-9]+]]:_(s32) = G_SHL [[ZEXT5]], [[C15]](s32)
594    ; CHECK: [[OR8:%[0-9]+]]:_(s32) = G_OR [[ZEXT4]], [[SHL8]]
595    ; CHECK: [[MV:%[0-9]+]]:_(s96) = G_MERGE_VALUES [[OR6]](s32), [[OR7]](s32), [[OR8]](s32)
596    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[MV]](s96)
597    %0:_(s8) = G_CONSTANT i8 0
598    %1:_(s8) = G_CONSTANT i8 1
599    %2:_(s8) = G_CONSTANT i8 2
600    %3:_(s8) = G_CONSTANT i8 3
601    %4:_(s8) = G_CONSTANT i8 4
602    %5:_(s8) = G_CONSTANT i8 5
603    %6:_(s8) = G_CONSTANT i8 6
604    %7:_(s8) = G_CONSTANT i8 7
605    %9:_(s8) = G_CONSTANT i8 8
606    %10:_(s8) = G_CONSTANT i8 9
607    %11:_(s8) = G_CONSTANT i8 10
608    %12:_(s8) = G_CONSTANT i8 11
609
610    %13:_(s96) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6, %7, %9, %10, %11, %12
611    $vgpr0_vgpr1_vgpr2 = COPY %13
612...
613
614---
615name: test_merge_s96_s16_s16_s16_s16_s16_s16
616body: |
617  bb.0:
618    ; CHECK-LABEL: name: test_merge_s96_s16_s16_s16_s16_s16_s16
619    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
620    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
621    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
622    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[C1]], [[C2]](s32)
623    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[C]], [[SHL]]
624    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
625    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
626    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C4]], [[C2]](s32)
627    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[C3]], [[SHL1]]
628    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
629    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
630    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[C6]], [[C2]](s32)
631    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[C5]], [[SHL2]]
632    ; CHECK: [[MV:%[0-9]+]]:_(s96) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32), [[OR2]](s32)
633    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[MV]](s96)
634    %0:_(s16) = G_CONSTANT i16 0
635    %1:_(s16) = G_CONSTANT i16 1
636    %2:_(s16) = G_CONSTANT i16 2
637    %3:_(s16) = G_CONSTANT i16 3
638    %4:_(s16) = G_CONSTANT i16 4
639    %5:_(s16) = G_CONSTANT i16 5
640    %8:_(s96) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5
641    $vgpr0_vgpr1_vgpr2 = COPY %8
642...
643
644---
645name: test_merge_s56_s8_s8_s8_s8_s8_s8_s8
646body: |
647  bb.0:
648    ; CHECK-LABEL: name: test_merge_s56_s8_s8_s8_s8_s8_s8_s8
649    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
650    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
651    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
652    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
653    ; CHECK: [[C3:%[0-9]+]]:_(s16) = G_CONSTANT i16 255
654    ; CHECK: [[C4:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
655    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[C4]], [[C3]]
656    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
657    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
658    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 255
659    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
660    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C6]]
661    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[COPY]](s32)
662    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[SHL]](s32)
663    ; CHECK: [[OR:%[0-9]+]]:_(s16) = G_OR [[AND]], [[TRUNC]]
664    ; CHECK: [[C7:%[0-9]+]]:_(s16) = G_CONSTANT i16 2
665    ; CHECK: [[AND2:%[0-9]+]]:_(s16) = G_AND [[C7]], [[C3]]
666    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
667    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
668    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C6]]
669    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[COPY2]](s32)
670    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[SHL1]](s32)
671    ; CHECK: [[OR1:%[0-9]+]]:_(s16) = G_OR [[AND2]], [[TRUNC1]]
672    ; CHECK: [[C8:%[0-9]+]]:_(s16) = G_CONSTANT i16 4
673    ; CHECK: [[AND4:%[0-9]+]]:_(s16) = G_AND [[C8]], [[C3]]
674    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C5]](s32)
675    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
676    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C6]]
677    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[COPY4]](s32)
678    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s16) = G_TRUNC [[SHL2]](s32)
679    ; CHECK: [[OR2:%[0-9]+]]:_(s16) = G_OR [[AND4]], [[TRUNC2]]
680    ; CHECK: [[C9:%[0-9]+]]:_(s16) = G_CONSTANT i16 6
681    ; CHECK: [[AND6:%[0-9]+]]:_(s16) = G_AND [[C9]], [[C3]]
682    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[DEF]](s32)
683    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C6]]
684    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C5]](s32)
685    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s16) = G_TRUNC [[SHL3]](s32)
686    ; CHECK: [[OR3:%[0-9]+]]:_(s16) = G_OR [[AND6]], [[TRUNC3]]
687    ; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[OR]](s16)
688    ; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[OR1]](s16)
689    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
690    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[ZEXT1]], [[C10]](s32)
691    ; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[ZEXT]], [[SHL4]]
692    ; CHECK: [[ZEXT2:%[0-9]+]]:_(s32) = G_ZEXT [[OR2]](s16)
693    ; CHECK: [[ZEXT3:%[0-9]+]]:_(s32) = G_ZEXT [[OR3]](s16)
694    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[ZEXT3]], [[C10]](s32)
695    ; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[ZEXT2]], [[SHL5]]
696    ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR4]](s32), [[OR5]](s32)
697    ; CHECK: [[TRUNC4:%[0-9]+]]:_(s56) = G_TRUNC [[MV]](s64)
698    ; CHECK: S_NOP 0, implicit [[TRUNC4]](s56)
699    %0:_(s8) = G_CONSTANT i8 0
700    %1:_(s8) = G_CONSTANT i8 1
701    %2:_(s8) = G_CONSTANT i8 2
702    %3:_(s8) = G_CONSTANT i8 3
703    %4:_(s8) = G_CONSTANT i8 4
704    %5:_(s8) = G_CONSTANT i8 5
705    %6:_(s8) = G_CONSTANT i8 6
706    %7:_(s56) = G_MERGE_VALUES %0, %1, %2, %3, %4, %5, %6
707    S_NOP 0, implicit %7
708...
709
710---
711name: test_merge_s68_s17_s17_s17_s17
712body: |
713  bb.0:
714    ; CHECK-LABEL: name: test_merge_s68_s17_s17_s17_s17
715    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
716    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
717    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 2
718    ; CHECK: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 3
719    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32)
720    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C1]]
721    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[C]](s32)
722    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
723    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
724    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
725    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[C]](s32)
726    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C1]]
727    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C2]](s32)
728    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[OR]], [[SHL1]]
729    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[C]](s32)
730    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C1]]
731    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C3]](s32)
732    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[OR1]], [[SHL2]]
733    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[C]](s32)
734    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C1]]
735    ; CHECK: [[C4:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
736    ; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND4]], [[C4]](s32)
737    ; CHECK: [[OR3:%[0-9]+]]:_(s32) = G_OR [[OR2]], [[SHL3]]
738    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[C]](s32)
739    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C1]]
740    ; CHECK: [[C5:%[0-9]+]]:_(s32) = G_CONSTANT i32 5
741    ; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C5]](s32)
742    ; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[OR3]], [[SHL4]]
743    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[C]](s32)
744    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C1]]
745    ; CHECK: [[C6:%[0-9]+]]:_(s32) = G_CONSTANT i32 6
746    ; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C6]](s32)
747    ; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[OR4]], [[SHL5]]
748    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[C]](s32)
749    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C1]]
750    ; CHECK: [[C7:%[0-9]+]]:_(s32) = G_CONSTANT i32 7
751    ; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C7]](s32)
752    ; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[OR5]], [[SHL6]]
753    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[C]](s32)
754    ; CHECK: [[AND8:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C1]]
755    ; CHECK: [[C8:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
756    ; CHECK: [[SHL7:%[0-9]+]]:_(s32) = G_SHL [[AND8]], [[C8]](s32)
757    ; CHECK: [[OR7:%[0-9]+]]:_(s32) = G_OR [[OR6]], [[SHL7]]
758    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[C]](s32)
759    ; CHECK: [[AND9:%[0-9]+]]:_(s32) = G_AND [[COPY9]], [[C1]]
760    ; CHECK: [[C9:%[0-9]+]]:_(s32) = G_CONSTANT i32 9
761    ; CHECK: [[SHL8:%[0-9]+]]:_(s32) = G_SHL [[AND9]], [[C9]](s32)
762    ; CHECK: [[OR8:%[0-9]+]]:_(s32) = G_OR [[OR7]], [[SHL8]]
763    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[C]](s32)
764    ; CHECK: [[AND10:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[C1]]
765    ; CHECK: [[C10:%[0-9]+]]:_(s32) = G_CONSTANT i32 10
766    ; CHECK: [[SHL9:%[0-9]+]]:_(s32) = G_SHL [[AND10]], [[C10]](s32)
767    ; CHECK: [[OR9:%[0-9]+]]:_(s32) = G_OR [[OR8]], [[SHL9]]
768    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[C]](s32)
769    ; CHECK: [[AND11:%[0-9]+]]:_(s32) = G_AND [[COPY11]], [[C1]]
770    ; CHECK: [[C11:%[0-9]+]]:_(s32) = G_CONSTANT i32 11
771    ; CHECK: [[SHL10:%[0-9]+]]:_(s32) = G_SHL [[AND11]], [[C11]](s32)
772    ; CHECK: [[OR10:%[0-9]+]]:_(s32) = G_OR [[OR9]], [[SHL10]]
773    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[C]](s32)
774    ; CHECK: [[AND12:%[0-9]+]]:_(s32) = G_AND [[COPY12]], [[C1]]
775    ; CHECK: [[C12:%[0-9]+]]:_(s32) = G_CONSTANT i32 12
776    ; CHECK: [[SHL11:%[0-9]+]]:_(s32) = G_SHL [[AND12]], [[C12]](s32)
777    ; CHECK: [[OR11:%[0-9]+]]:_(s32) = G_OR [[OR10]], [[SHL11]]
778    ; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[C]](s32)
779    ; CHECK: [[AND13:%[0-9]+]]:_(s32) = G_AND [[COPY13]], [[C1]]
780    ; CHECK: [[C13:%[0-9]+]]:_(s32) = G_CONSTANT i32 13
781    ; CHECK: [[SHL12:%[0-9]+]]:_(s32) = G_SHL [[AND13]], [[C13]](s32)
782    ; CHECK: [[OR12:%[0-9]+]]:_(s32) = G_OR [[OR11]], [[SHL12]]
783    ; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[C]](s32)
784    ; CHECK: [[AND14:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[C1]]
785    ; CHECK: [[C14:%[0-9]+]]:_(s32) = G_CONSTANT i32 14
786    ; CHECK: [[SHL13:%[0-9]+]]:_(s32) = G_SHL [[AND14]], [[C14]](s32)
787    ; CHECK: [[OR13:%[0-9]+]]:_(s32) = G_OR [[OR12]], [[SHL13]]
788    ; CHECK: [[COPY15:%[0-9]+]]:_(s32) = COPY [[C]](s32)
789    ; CHECK: [[AND15:%[0-9]+]]:_(s32) = G_AND [[COPY15]], [[C1]]
790    ; CHECK: [[C15:%[0-9]+]]:_(s32) = G_CONSTANT i32 15
791    ; CHECK: [[SHL14:%[0-9]+]]:_(s32) = G_SHL [[AND15]], [[C15]](s32)
792    ; CHECK: [[OR14:%[0-9]+]]:_(s32) = G_OR [[OR13]], [[SHL14]]
793    ; CHECK: [[COPY16:%[0-9]+]]:_(s32) = COPY [[C]](s32)
794    ; CHECK: [[AND16:%[0-9]+]]:_(s32) = G_AND [[COPY16]], [[C1]]
795    ; CHECK: [[C16:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
796    ; CHECK: [[SHL15:%[0-9]+]]:_(s32) = G_SHL [[AND16]], [[C16]](s32)
797    ; CHECK: [[OR15:%[0-9]+]]:_(s32) = G_OR [[OR14]], [[SHL15]]
798    ; CHECK: [[COPY17:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
799    ; CHECK: [[AND17:%[0-9]+]]:_(s32) = G_AND [[COPY17]], [[C1]]
800    ; CHECK: [[C17:%[0-9]+]]:_(s32) = G_CONSTANT i32 17
801    ; CHECK: [[SHL16:%[0-9]+]]:_(s32) = G_SHL [[AND17]], [[C17]](s32)
802    ; CHECK: [[OR16:%[0-9]+]]:_(s32) = G_OR [[OR15]], [[SHL16]]
803    ; CHECK: [[COPY18:%[0-9]+]]:_(s32) = COPY [[C]](s32)
804    ; CHECK: [[AND18:%[0-9]+]]:_(s32) = G_AND [[COPY18]], [[C1]]
805    ; CHECK: [[C18:%[0-9]+]]:_(s32) = G_CONSTANT i32 18
806    ; CHECK: [[SHL17:%[0-9]+]]:_(s32) = G_SHL [[AND18]], [[C18]](s32)
807    ; CHECK: [[OR17:%[0-9]+]]:_(s32) = G_OR [[OR16]], [[SHL17]]
808    ; CHECK: [[COPY19:%[0-9]+]]:_(s32) = COPY [[C]](s32)
809    ; CHECK: [[AND19:%[0-9]+]]:_(s32) = G_AND [[COPY19]], [[C1]]
810    ; CHECK: [[C19:%[0-9]+]]:_(s32) = G_CONSTANT i32 19
811    ; CHECK: [[SHL18:%[0-9]+]]:_(s32) = G_SHL [[AND19]], [[C19]](s32)
812    ; CHECK: [[OR18:%[0-9]+]]:_(s32) = G_OR [[OR17]], [[SHL18]]
813    ; CHECK: [[COPY20:%[0-9]+]]:_(s32) = COPY [[C]](s32)
814    ; CHECK: [[AND20:%[0-9]+]]:_(s32) = G_AND [[COPY20]], [[C1]]
815    ; CHECK: [[C20:%[0-9]+]]:_(s32) = G_CONSTANT i32 20
816    ; CHECK: [[SHL19:%[0-9]+]]:_(s32) = G_SHL [[AND20]], [[C20]](s32)
817    ; CHECK: [[OR19:%[0-9]+]]:_(s32) = G_OR [[OR18]], [[SHL19]]
818    ; CHECK: [[COPY21:%[0-9]+]]:_(s32) = COPY [[C]](s32)
819    ; CHECK: [[AND21:%[0-9]+]]:_(s32) = G_AND [[COPY21]], [[C1]]
820    ; CHECK: [[C21:%[0-9]+]]:_(s32) = G_CONSTANT i32 21
821    ; CHECK: [[SHL20:%[0-9]+]]:_(s32) = G_SHL [[AND21]], [[C21]](s32)
822    ; CHECK: [[OR20:%[0-9]+]]:_(s32) = G_OR [[OR19]], [[SHL20]]
823    ; CHECK: [[COPY22:%[0-9]+]]:_(s32) = COPY [[C]](s32)
824    ; CHECK: [[AND22:%[0-9]+]]:_(s32) = G_AND [[COPY22]], [[C1]]
825    ; CHECK: [[C22:%[0-9]+]]:_(s32) = G_CONSTANT i32 22
826    ; CHECK: [[SHL21:%[0-9]+]]:_(s32) = G_SHL [[AND22]], [[C22]](s32)
827    ; CHECK: [[OR21:%[0-9]+]]:_(s32) = G_OR [[OR20]], [[SHL21]]
828    ; CHECK: [[COPY23:%[0-9]+]]:_(s32) = COPY [[C]](s32)
829    ; CHECK: [[AND23:%[0-9]+]]:_(s32) = G_AND [[COPY23]], [[C1]]
830    ; CHECK: [[C23:%[0-9]+]]:_(s32) = G_CONSTANT i32 23
831    ; CHECK: [[SHL22:%[0-9]+]]:_(s32) = G_SHL [[AND23]], [[C23]](s32)
832    ; CHECK: [[OR22:%[0-9]+]]:_(s32) = G_OR [[OR21]], [[SHL22]]
833    ; CHECK: [[COPY24:%[0-9]+]]:_(s32) = COPY [[C]](s32)
834    ; CHECK: [[AND24:%[0-9]+]]:_(s32) = G_AND [[COPY24]], [[C1]]
835    ; CHECK: [[C24:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
836    ; CHECK: [[SHL23:%[0-9]+]]:_(s32) = G_SHL [[AND24]], [[C24]](s32)
837    ; CHECK: [[OR23:%[0-9]+]]:_(s32) = G_OR [[OR22]], [[SHL23]]
838    ; CHECK: [[COPY25:%[0-9]+]]:_(s32) = COPY [[C]](s32)
839    ; CHECK: [[AND25:%[0-9]+]]:_(s32) = G_AND [[COPY25]], [[C1]]
840    ; CHECK: [[C25:%[0-9]+]]:_(s32) = G_CONSTANT i32 25
841    ; CHECK: [[SHL24:%[0-9]+]]:_(s32) = G_SHL [[AND25]], [[C25]](s32)
842    ; CHECK: [[OR24:%[0-9]+]]:_(s32) = G_OR [[OR23]], [[SHL24]]
843    ; CHECK: [[COPY26:%[0-9]+]]:_(s32) = COPY [[C]](s32)
844    ; CHECK: [[AND26:%[0-9]+]]:_(s32) = G_AND [[COPY26]], [[C1]]
845    ; CHECK: [[C26:%[0-9]+]]:_(s32) = G_CONSTANT i32 26
846    ; CHECK: [[SHL25:%[0-9]+]]:_(s32) = G_SHL [[AND26]], [[C26]](s32)
847    ; CHECK: [[OR25:%[0-9]+]]:_(s32) = G_OR [[OR24]], [[SHL25]]
848    ; CHECK: [[COPY27:%[0-9]+]]:_(s32) = COPY [[C]](s32)
849    ; CHECK: [[AND27:%[0-9]+]]:_(s32) = G_AND [[COPY27]], [[C1]]
850    ; CHECK: [[C27:%[0-9]+]]:_(s32) = G_CONSTANT i32 27
851    ; CHECK: [[SHL26:%[0-9]+]]:_(s32) = G_SHL [[AND27]], [[C27]](s32)
852    ; CHECK: [[OR26:%[0-9]+]]:_(s32) = G_OR [[OR25]], [[SHL26]]
853    ; CHECK: [[COPY28:%[0-9]+]]:_(s32) = COPY [[C]](s32)
854    ; CHECK: [[AND28:%[0-9]+]]:_(s32) = G_AND [[COPY28]], [[C1]]
855    ; CHECK: [[C28:%[0-9]+]]:_(s32) = G_CONSTANT i32 28
856    ; CHECK: [[SHL27:%[0-9]+]]:_(s32) = G_SHL [[AND28]], [[C28]](s32)
857    ; CHECK: [[OR27:%[0-9]+]]:_(s32) = G_OR [[OR26]], [[SHL27]]
858    ; CHECK: [[COPY29:%[0-9]+]]:_(s32) = COPY [[C]](s32)
859    ; CHECK: [[AND29:%[0-9]+]]:_(s32) = G_AND [[COPY29]], [[C1]]
860    ; CHECK: [[C29:%[0-9]+]]:_(s32) = G_CONSTANT i32 29
861    ; CHECK: [[SHL28:%[0-9]+]]:_(s32) = G_SHL [[AND29]], [[C29]](s32)
862    ; CHECK: [[OR28:%[0-9]+]]:_(s32) = G_OR [[OR27]], [[SHL28]]
863    ; CHECK: [[COPY30:%[0-9]+]]:_(s32) = COPY [[C]](s32)
864    ; CHECK: [[AND30:%[0-9]+]]:_(s32) = G_AND [[COPY30]], [[C1]]
865    ; CHECK: [[C30:%[0-9]+]]:_(s32) = G_CONSTANT i32 30
866    ; CHECK: [[SHL29:%[0-9]+]]:_(s32) = G_SHL [[AND30]], [[C30]](s32)
867    ; CHECK: [[OR29:%[0-9]+]]:_(s32) = G_OR [[OR28]], [[SHL29]]
868    ; CHECK: [[COPY31:%[0-9]+]]:_(s32) = COPY [[C]](s32)
869    ; CHECK: [[AND31:%[0-9]+]]:_(s32) = G_AND [[COPY31]], [[C1]]
870    ; CHECK: [[C31:%[0-9]+]]:_(s32) = G_CONSTANT i32 31
871    ; CHECK: [[SHL30:%[0-9]+]]:_(s32) = G_SHL [[AND31]], [[C31]](s32)
872    ; CHECK: [[OR30:%[0-9]+]]:_(s32) = G_OR [[OR29]], [[SHL30]]
873    ; CHECK: [[COPY32:%[0-9]+]]:_(s32) = COPY [[C]](s32)
874    ; CHECK: [[AND32:%[0-9]+]]:_(s32) = G_AND [[COPY32]], [[C1]]
875    ; CHECK: [[COPY33:%[0-9]+]]:_(s32) = COPY [[C]](s32)
876    ; CHECK: [[AND33:%[0-9]+]]:_(s32) = G_AND [[COPY33]], [[C1]]
877    ; CHECK: [[SHL31:%[0-9]+]]:_(s32) = G_SHL [[AND33]], [[C1]](s32)
878    ; CHECK: [[OR31:%[0-9]+]]:_(s32) = G_OR [[AND32]], [[SHL31]]
879    ; CHECK: [[COPY34:%[0-9]+]]:_(s32) = COPY [[C2]](s32)
880    ; CHECK: [[AND34:%[0-9]+]]:_(s32) = G_AND [[COPY34]], [[C1]]
881    ; CHECK: [[SHL32:%[0-9]+]]:_(s32) = G_SHL [[AND34]], [[C2]](s32)
882    ; CHECK: [[OR32:%[0-9]+]]:_(s32) = G_OR [[OR31]], [[SHL32]]
883    ; CHECK: [[COPY35:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
884    ; CHECK: [[AND35:%[0-9]+]]:_(s32) = G_AND [[COPY35]], [[C1]]
885    ; CHECK: [[SHL33:%[0-9]+]]:_(s32) = G_SHL [[AND35]], [[C3]](s32)
886    ; CHECK: [[OR33:%[0-9]+]]:_(s32) = G_OR [[OR32]], [[SHL33]]
887    ; CHECK: [[COPY36:%[0-9]+]]:_(s32) = COPY [[C]](s32)
888    ; CHECK: [[AND36:%[0-9]+]]:_(s32) = G_AND [[COPY36]], [[C1]]
889    ; CHECK: [[SHL34:%[0-9]+]]:_(s32) = G_SHL [[AND36]], [[C4]](s32)
890    ; CHECK: [[OR34:%[0-9]+]]:_(s32) = G_OR [[OR33]], [[SHL34]]
891    ; CHECK: [[COPY37:%[0-9]+]]:_(s32) = COPY [[C]](s32)
892    ; CHECK: [[AND37:%[0-9]+]]:_(s32) = G_AND [[COPY37]], [[C1]]
893    ; CHECK: [[SHL35:%[0-9]+]]:_(s32) = G_SHL [[AND37]], [[C5]](s32)
894    ; CHECK: [[OR35:%[0-9]+]]:_(s32) = G_OR [[OR34]], [[SHL35]]
895    ; CHECK: [[COPY38:%[0-9]+]]:_(s32) = COPY [[C]](s32)
896    ; CHECK: [[AND38:%[0-9]+]]:_(s32) = G_AND [[COPY38]], [[C1]]
897    ; CHECK: [[SHL36:%[0-9]+]]:_(s32) = G_SHL [[AND38]], [[C6]](s32)
898    ; CHECK: [[OR36:%[0-9]+]]:_(s32) = G_OR [[OR35]], [[SHL36]]
899    ; CHECK: [[COPY39:%[0-9]+]]:_(s32) = COPY [[C]](s32)
900    ; CHECK: [[AND39:%[0-9]+]]:_(s32) = G_AND [[COPY39]], [[C1]]
901    ; CHECK: [[SHL37:%[0-9]+]]:_(s32) = G_SHL [[AND39]], [[C7]](s32)
902    ; CHECK: [[OR37:%[0-9]+]]:_(s32) = G_OR [[OR36]], [[SHL37]]
903    ; CHECK: [[COPY40:%[0-9]+]]:_(s32) = COPY [[C]](s32)
904    ; CHECK: [[AND40:%[0-9]+]]:_(s32) = G_AND [[COPY40]], [[C1]]
905    ; CHECK: [[SHL38:%[0-9]+]]:_(s32) = G_SHL [[AND40]], [[C8]](s32)
906    ; CHECK: [[OR38:%[0-9]+]]:_(s32) = G_OR [[OR37]], [[SHL38]]
907    ; CHECK: [[COPY41:%[0-9]+]]:_(s32) = COPY [[C]](s32)
908    ; CHECK: [[AND41:%[0-9]+]]:_(s32) = G_AND [[COPY41]], [[C1]]
909    ; CHECK: [[SHL39:%[0-9]+]]:_(s32) = G_SHL [[AND41]], [[C9]](s32)
910    ; CHECK: [[OR39:%[0-9]+]]:_(s32) = G_OR [[OR38]], [[SHL39]]
911    ; CHECK: [[COPY42:%[0-9]+]]:_(s32) = COPY [[C]](s32)
912    ; CHECK: [[AND42:%[0-9]+]]:_(s32) = G_AND [[COPY42]], [[C1]]
913    ; CHECK: [[SHL40:%[0-9]+]]:_(s32) = G_SHL [[AND42]], [[C10]](s32)
914    ; CHECK: [[OR40:%[0-9]+]]:_(s32) = G_OR [[OR39]], [[SHL40]]
915    ; CHECK: [[COPY43:%[0-9]+]]:_(s32) = COPY [[C]](s32)
916    ; CHECK: [[AND43:%[0-9]+]]:_(s32) = G_AND [[COPY43]], [[C1]]
917    ; CHECK: [[SHL41:%[0-9]+]]:_(s32) = G_SHL [[AND43]], [[C11]](s32)
918    ; CHECK: [[OR41:%[0-9]+]]:_(s32) = G_OR [[OR40]], [[SHL41]]
919    ; CHECK: [[COPY44:%[0-9]+]]:_(s32) = COPY [[C]](s32)
920    ; CHECK: [[AND44:%[0-9]+]]:_(s32) = G_AND [[COPY44]], [[C1]]
921    ; CHECK: [[SHL42:%[0-9]+]]:_(s32) = G_SHL [[AND44]], [[C12]](s32)
922    ; CHECK: [[OR42:%[0-9]+]]:_(s32) = G_OR [[OR41]], [[SHL42]]
923    ; CHECK: [[COPY45:%[0-9]+]]:_(s32) = COPY [[C]](s32)
924    ; CHECK: [[AND45:%[0-9]+]]:_(s32) = G_AND [[COPY45]], [[C1]]
925    ; CHECK: [[SHL43:%[0-9]+]]:_(s32) = G_SHL [[AND45]], [[C13]](s32)
926    ; CHECK: [[OR43:%[0-9]+]]:_(s32) = G_OR [[OR42]], [[SHL43]]
927    ; CHECK: [[COPY46:%[0-9]+]]:_(s32) = COPY [[C]](s32)
928    ; CHECK: [[AND46:%[0-9]+]]:_(s32) = G_AND [[COPY46]], [[C1]]
929    ; CHECK: [[SHL44:%[0-9]+]]:_(s32) = G_SHL [[AND46]], [[C14]](s32)
930    ; CHECK: [[OR44:%[0-9]+]]:_(s32) = G_OR [[OR43]], [[SHL44]]
931    ; CHECK: [[COPY47:%[0-9]+]]:_(s32) = COPY [[C]](s32)
932    ; CHECK: [[AND47:%[0-9]+]]:_(s32) = G_AND [[COPY47]], [[C1]]
933    ; CHECK: [[SHL45:%[0-9]+]]:_(s32) = G_SHL [[AND47]], [[C15]](s32)
934    ; CHECK: [[OR45:%[0-9]+]]:_(s32) = G_OR [[OR44]], [[SHL45]]
935    ; CHECK: [[COPY48:%[0-9]+]]:_(s32) = COPY [[C]](s32)
936    ; CHECK: [[AND48:%[0-9]+]]:_(s32) = G_AND [[COPY48]], [[C1]]
937    ; CHECK: [[SHL46:%[0-9]+]]:_(s32) = G_SHL [[AND48]], [[C16]](s32)
938    ; CHECK: [[OR46:%[0-9]+]]:_(s32) = G_OR [[OR45]], [[SHL46]]
939    ; CHECK: [[COPY49:%[0-9]+]]:_(s32) = COPY [[C]](s32)
940    ; CHECK: [[AND49:%[0-9]+]]:_(s32) = G_AND [[COPY49]], [[C1]]
941    ; CHECK: [[SHL47:%[0-9]+]]:_(s32) = G_SHL [[AND49]], [[C17]](s32)
942    ; CHECK: [[OR47:%[0-9]+]]:_(s32) = G_OR [[OR46]], [[SHL47]]
943    ; CHECK: [[COPY50:%[0-9]+]]:_(s32) = COPY [[C]](s32)
944    ; CHECK: [[AND50:%[0-9]+]]:_(s32) = G_AND [[COPY50]], [[C1]]
945    ; CHECK: [[SHL48:%[0-9]+]]:_(s32) = G_SHL [[AND50]], [[C18]](s32)
946    ; CHECK: [[OR48:%[0-9]+]]:_(s32) = G_OR [[OR47]], [[SHL48]]
947    ; CHECK: [[COPY51:%[0-9]+]]:_(s32) = COPY [[C3]](s32)
948    ; CHECK: [[AND51:%[0-9]+]]:_(s32) = G_AND [[COPY51]], [[C1]]
949    ; CHECK: [[SHL49:%[0-9]+]]:_(s32) = G_SHL [[AND51]], [[C19]](s32)
950    ; CHECK: [[OR49:%[0-9]+]]:_(s32) = G_OR [[OR48]], [[SHL49]]
951    ; CHECK: [[COPY52:%[0-9]+]]:_(s32) = COPY [[C1]](s32)
952    ; CHECK: [[AND52:%[0-9]+]]:_(s32) = G_AND [[COPY52]], [[C1]]
953    ; CHECK: [[SHL50:%[0-9]+]]:_(s32) = G_SHL [[AND52]], [[C20]](s32)
954    ; CHECK: [[OR50:%[0-9]+]]:_(s32) = G_OR [[OR49]], [[SHL50]]
955    ; CHECK: [[COPY53:%[0-9]+]]:_(s32) = COPY [[C]](s32)
956    ; CHECK: [[AND53:%[0-9]+]]:_(s32) = G_AND [[COPY53]], [[C1]]
957    ; CHECK: [[SHL51:%[0-9]+]]:_(s32) = G_SHL [[AND53]], [[C21]](s32)
958    ; CHECK: [[OR51:%[0-9]+]]:_(s32) = G_OR [[OR50]], [[SHL51]]
959    ; CHECK: [[COPY54:%[0-9]+]]:_(s32) = COPY [[C]](s32)
960    ; CHECK: [[AND54:%[0-9]+]]:_(s32) = G_AND [[COPY54]], [[C1]]
961    ; CHECK: [[SHL52:%[0-9]+]]:_(s32) = G_SHL [[AND54]], [[C22]](s32)
962    ; CHECK: [[OR52:%[0-9]+]]:_(s32) = G_OR [[OR51]], [[SHL52]]
963    ; CHECK: [[COPY55:%[0-9]+]]:_(s32) = COPY [[C]](s32)
964    ; CHECK: [[AND55:%[0-9]+]]:_(s32) = G_AND [[COPY55]], [[C1]]
965    ; CHECK: [[SHL53:%[0-9]+]]:_(s32) = G_SHL [[AND55]], [[C23]](s32)
966    ; CHECK: [[OR53:%[0-9]+]]:_(s32) = G_OR [[OR52]], [[SHL53]]
967    ; CHECK: [[COPY56:%[0-9]+]]:_(s32) = COPY [[C]](s32)
968    ; CHECK: [[AND56:%[0-9]+]]:_(s32) = G_AND [[COPY56]], [[C1]]
969    ; CHECK: [[SHL54:%[0-9]+]]:_(s32) = G_SHL [[AND56]], [[C24]](s32)
970    ; CHECK: [[OR54:%[0-9]+]]:_(s32) = G_OR [[OR53]], [[SHL54]]
971    ; CHECK: [[COPY57:%[0-9]+]]:_(s32) = COPY [[C]](s32)
972    ; CHECK: [[AND57:%[0-9]+]]:_(s32) = G_AND [[COPY57]], [[C1]]
973    ; CHECK: [[SHL55:%[0-9]+]]:_(s32) = G_SHL [[AND57]], [[C25]](s32)
974    ; CHECK: [[OR55:%[0-9]+]]:_(s32) = G_OR [[OR54]], [[SHL55]]
975    ; CHECK: [[COPY58:%[0-9]+]]:_(s32) = COPY [[C]](s32)
976    ; CHECK: [[AND58:%[0-9]+]]:_(s32) = G_AND [[COPY58]], [[C1]]
977    ; CHECK: [[SHL56:%[0-9]+]]:_(s32) = G_SHL [[AND58]], [[C26]](s32)
978    ; CHECK: [[OR56:%[0-9]+]]:_(s32) = G_OR [[OR55]], [[SHL56]]
979    ; CHECK: [[COPY59:%[0-9]+]]:_(s32) = COPY [[C]](s32)
980    ; CHECK: [[AND59:%[0-9]+]]:_(s32) = G_AND [[COPY59]], [[C1]]
981    ; CHECK: [[SHL57:%[0-9]+]]:_(s32) = G_SHL [[AND59]], [[C27]](s32)
982    ; CHECK: [[OR57:%[0-9]+]]:_(s32) = G_OR [[OR56]], [[SHL57]]
983    ; CHECK: [[COPY60:%[0-9]+]]:_(s32) = COPY [[C]](s32)
984    ; CHECK: [[AND60:%[0-9]+]]:_(s32) = G_AND [[COPY60]], [[C1]]
985    ; CHECK: [[SHL58:%[0-9]+]]:_(s32) = G_SHL [[AND60]], [[C28]](s32)
986    ; CHECK: [[OR58:%[0-9]+]]:_(s32) = G_OR [[OR57]], [[SHL58]]
987    ; CHECK: [[COPY61:%[0-9]+]]:_(s32) = COPY [[C]](s32)
988    ; CHECK: [[AND61:%[0-9]+]]:_(s32) = G_AND [[COPY61]], [[C1]]
989    ; CHECK: [[SHL59:%[0-9]+]]:_(s32) = G_SHL [[AND61]], [[C29]](s32)
990    ; CHECK: [[OR59:%[0-9]+]]:_(s32) = G_OR [[OR58]], [[SHL59]]
991    ; CHECK: [[COPY62:%[0-9]+]]:_(s32) = COPY [[C]](s32)
992    ; CHECK: [[AND62:%[0-9]+]]:_(s32) = G_AND [[COPY62]], [[C1]]
993    ; CHECK: [[SHL60:%[0-9]+]]:_(s32) = G_SHL [[AND62]], [[C30]](s32)
994    ; CHECK: [[OR60:%[0-9]+]]:_(s32) = G_OR [[OR59]], [[SHL60]]
995    ; CHECK: [[COPY63:%[0-9]+]]:_(s32) = COPY [[C]](s32)
996    ; CHECK: [[AND63:%[0-9]+]]:_(s32) = G_AND [[COPY63]], [[C1]]
997    ; CHECK: [[SHL61:%[0-9]+]]:_(s32) = G_SHL [[AND63]], [[C31]](s32)
998    ; CHECK: [[OR61:%[0-9]+]]:_(s32) = G_OR [[OR60]], [[SHL61]]
999    ; CHECK: [[COPY64:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1000    ; CHECK: [[AND64:%[0-9]+]]:_(s32) = G_AND [[COPY64]], [[C1]]
1001    ; CHECK: [[COPY65:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1002    ; CHECK: [[AND65:%[0-9]+]]:_(s32) = G_AND [[COPY65]], [[C1]]
1003    ; CHECK: [[SHL62:%[0-9]+]]:_(s32) = G_SHL [[AND65]], [[C1]](s32)
1004    ; CHECK: [[OR62:%[0-9]+]]:_(s32) = G_OR [[AND64]], [[SHL62]]
1005    ; CHECK: [[COPY66:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1006    ; CHECK: [[AND66:%[0-9]+]]:_(s32) = G_AND [[COPY66]], [[C1]]
1007    ; CHECK: [[SHL63:%[0-9]+]]:_(s32) = G_SHL [[AND66]], [[C2]](s32)
1008    ; CHECK: [[OR63:%[0-9]+]]:_(s32) = G_OR [[OR62]], [[SHL63]]
1009    ; CHECK: [[COPY67:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1010    ; CHECK: [[AND67:%[0-9]+]]:_(s32) = G_AND [[COPY67]], [[C1]]
1011    ; CHECK: [[SHL64:%[0-9]+]]:_(s32) = G_SHL [[AND67]], [[C3]](s32)
1012    ; CHECK: [[OR64:%[0-9]+]]:_(s32) = G_OR [[OR63]], [[SHL64]]
1013    ; CHECK: [[COPY68:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1014    ; CHECK: [[SHL65:%[0-9]+]]:_(s32) = G_SHL [[COPY68]], [[C4]](s32)
1015    ; CHECK: [[OR65:%[0-9]+]]:_(s32) = G_OR [[OR64]], [[SHL65]]
1016    ; CHECK: [[COPY69:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1017    ; CHECK: [[SHL66:%[0-9]+]]:_(s32) = G_SHL [[COPY69]], [[C5]](s32)
1018    ; CHECK: [[OR66:%[0-9]+]]:_(s32) = G_OR [[OR65]], [[SHL66]]
1019    ; CHECK: [[COPY70:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1020    ; CHECK: [[SHL67:%[0-9]+]]:_(s32) = G_SHL [[COPY70]], [[C6]](s32)
1021    ; CHECK: [[OR67:%[0-9]+]]:_(s32) = G_OR [[OR66]], [[SHL67]]
1022    ; CHECK: [[COPY71:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1023    ; CHECK: [[SHL68:%[0-9]+]]:_(s32) = G_SHL [[COPY71]], [[C7]](s32)
1024    ; CHECK: [[OR68:%[0-9]+]]:_(s32) = G_OR [[OR67]], [[SHL68]]
1025    ; CHECK: [[COPY72:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1026    ; CHECK: [[SHL69:%[0-9]+]]:_(s32) = G_SHL [[COPY72]], [[C8]](s32)
1027    ; CHECK: [[OR69:%[0-9]+]]:_(s32) = G_OR [[OR68]], [[SHL69]]
1028    ; CHECK: [[COPY73:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1029    ; CHECK: [[SHL70:%[0-9]+]]:_(s32) = G_SHL [[COPY73]], [[C9]](s32)
1030    ; CHECK: [[OR70:%[0-9]+]]:_(s32) = G_OR [[OR69]], [[SHL70]]
1031    ; CHECK: [[COPY74:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1032    ; CHECK: [[SHL71:%[0-9]+]]:_(s32) = G_SHL [[COPY74]], [[C10]](s32)
1033    ; CHECK: [[OR71:%[0-9]+]]:_(s32) = G_OR [[OR70]], [[SHL71]]
1034    ; CHECK: [[COPY75:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1035    ; CHECK: [[SHL72:%[0-9]+]]:_(s32) = G_SHL [[COPY75]], [[C11]](s32)
1036    ; CHECK: [[OR72:%[0-9]+]]:_(s32) = G_OR [[OR71]], [[SHL72]]
1037    ; CHECK: [[COPY76:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1038    ; CHECK: [[SHL73:%[0-9]+]]:_(s32) = G_SHL [[COPY76]], [[C12]](s32)
1039    ; CHECK: [[OR73:%[0-9]+]]:_(s32) = G_OR [[OR72]], [[SHL73]]
1040    ; CHECK: [[COPY77:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1041    ; CHECK: [[SHL74:%[0-9]+]]:_(s32) = G_SHL [[COPY77]], [[C13]](s32)
1042    ; CHECK: [[OR74:%[0-9]+]]:_(s32) = G_OR [[OR73]], [[SHL74]]
1043    ; CHECK: [[COPY78:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1044    ; CHECK: [[SHL75:%[0-9]+]]:_(s32) = G_SHL [[COPY78]], [[C14]](s32)
1045    ; CHECK: [[OR75:%[0-9]+]]:_(s32) = G_OR [[OR74]], [[SHL75]]
1046    ; CHECK: [[COPY79:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1047    ; CHECK: [[SHL76:%[0-9]+]]:_(s32) = G_SHL [[COPY79]], [[C15]](s32)
1048    ; CHECK: [[OR76:%[0-9]+]]:_(s32) = G_OR [[OR75]], [[SHL76]]
1049    ; CHECK: [[COPY80:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1050    ; CHECK: [[SHL77:%[0-9]+]]:_(s32) = G_SHL [[COPY80]], [[C16]](s32)
1051    ; CHECK: [[OR77:%[0-9]+]]:_(s32) = G_OR [[OR76]], [[SHL77]]
1052    ; CHECK: [[COPY81:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1053    ; CHECK: [[SHL78:%[0-9]+]]:_(s32) = G_SHL [[COPY81]], [[C17]](s32)
1054    ; CHECK: [[OR78:%[0-9]+]]:_(s32) = G_OR [[OR77]], [[SHL78]]
1055    ; CHECK: [[COPY82:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1056    ; CHECK: [[SHL79:%[0-9]+]]:_(s32) = G_SHL [[COPY82]], [[C18]](s32)
1057    ; CHECK: [[OR79:%[0-9]+]]:_(s32) = G_OR [[OR78]], [[SHL79]]
1058    ; CHECK: [[COPY83:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1059    ; CHECK: [[SHL80:%[0-9]+]]:_(s32) = G_SHL [[COPY83]], [[C19]](s32)
1060    ; CHECK: [[OR80:%[0-9]+]]:_(s32) = G_OR [[OR79]], [[SHL80]]
1061    ; CHECK: [[COPY84:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1062    ; CHECK: [[SHL81:%[0-9]+]]:_(s32) = G_SHL [[COPY84]], [[C20]](s32)
1063    ; CHECK: [[OR81:%[0-9]+]]:_(s32) = G_OR [[OR80]], [[SHL81]]
1064    ; CHECK: [[COPY85:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1065    ; CHECK: [[SHL82:%[0-9]+]]:_(s32) = G_SHL [[COPY85]], [[C21]](s32)
1066    ; CHECK: [[OR82:%[0-9]+]]:_(s32) = G_OR [[OR81]], [[SHL82]]
1067    ; CHECK: [[COPY86:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1068    ; CHECK: [[SHL83:%[0-9]+]]:_(s32) = G_SHL [[COPY86]], [[C22]](s32)
1069    ; CHECK: [[OR83:%[0-9]+]]:_(s32) = G_OR [[OR82]], [[SHL83]]
1070    ; CHECK: [[COPY87:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1071    ; CHECK: [[SHL84:%[0-9]+]]:_(s32) = G_SHL [[COPY87]], [[C23]](s32)
1072    ; CHECK: [[OR84:%[0-9]+]]:_(s32) = G_OR [[OR83]], [[SHL84]]
1073    ; CHECK: [[COPY88:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1074    ; CHECK: [[SHL85:%[0-9]+]]:_(s32) = G_SHL [[COPY88]], [[C24]](s32)
1075    ; CHECK: [[OR85:%[0-9]+]]:_(s32) = G_OR [[OR84]], [[SHL85]]
1076    ; CHECK: [[COPY89:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1077    ; CHECK: [[SHL86:%[0-9]+]]:_(s32) = G_SHL [[COPY89]], [[C25]](s32)
1078    ; CHECK: [[OR86:%[0-9]+]]:_(s32) = G_OR [[OR85]], [[SHL86]]
1079    ; CHECK: [[COPY90:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1080    ; CHECK: [[SHL87:%[0-9]+]]:_(s32) = G_SHL [[COPY90]], [[C26]](s32)
1081    ; CHECK: [[OR87:%[0-9]+]]:_(s32) = G_OR [[OR86]], [[SHL87]]
1082    ; CHECK: [[COPY91:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1083    ; CHECK: [[SHL88:%[0-9]+]]:_(s32) = G_SHL [[COPY91]], [[C27]](s32)
1084    ; CHECK: [[OR88:%[0-9]+]]:_(s32) = G_OR [[OR87]], [[SHL88]]
1085    ; CHECK: [[COPY92:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1086    ; CHECK: [[SHL89:%[0-9]+]]:_(s32) = G_SHL [[COPY92]], [[C28]](s32)
1087    ; CHECK: [[OR89:%[0-9]+]]:_(s32) = G_OR [[OR88]], [[SHL89]]
1088    ; CHECK: [[COPY93:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1089    ; CHECK: [[SHL90:%[0-9]+]]:_(s32) = G_SHL [[COPY93]], [[C29]](s32)
1090    ; CHECK: [[OR90:%[0-9]+]]:_(s32) = G_OR [[OR89]], [[SHL90]]
1091    ; CHECK: [[COPY94:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1092    ; CHECK: [[SHL91:%[0-9]+]]:_(s32) = G_SHL [[COPY94]], [[C30]](s32)
1093    ; CHECK: [[OR91:%[0-9]+]]:_(s32) = G_OR [[OR90]], [[SHL91]]
1094    ; CHECK: [[COPY95:%[0-9]+]]:_(s32) = COPY [[C]](s32)
1095    ; CHECK: [[SHL92:%[0-9]+]]:_(s32) = G_SHL [[COPY95]], [[C31]](s32)
1096    ; CHECK: [[OR92:%[0-9]+]]:_(s32) = G_OR [[OR91]], [[SHL92]]
1097    ; CHECK: [[MV:%[0-9]+]]:_(s96) = G_MERGE_VALUES [[OR30]](s32), [[OR61]](s32), [[OR92]](s32)
1098    ; CHECK: [[TRUNC:%[0-9]+]]:_(s68) = G_TRUNC [[MV]](s96)
1099    ; CHECK: S_NOP 0, implicit [[TRUNC]](s68)
1100    %0:_(s17) = G_CONSTANT i17 0
1101    %1:_(s17) = G_CONSTANT i17 1
1102    %2:_(s17) = G_CONSTANT i17 2
1103    %3:_(s17) = G_CONSTANT i17 3
1104    %4:_(s68) = G_MERGE_VALUES %0, %1, %2, %3
1105    S_NOP 0, implicit %4
1106...
1107---
1108name: test_merge_p3_s16_s16
1109body: |
1110  bb.0:
1111    ; CHECK-LABEL: name: test_merge_p3_s16_s16
1112    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1113    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
1114    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1115    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[C1]], [[C2]](s32)
1116    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[C]], [[SHL]]
1117    ; CHECK: [[INTTOPTR:%[0-9]+]]:_(p3) = G_INTTOPTR [[OR]](s32)
1118    ; CHECK: $vgpr0 = COPY [[INTTOPTR]](p3)
1119    %0:_(s16) = G_CONSTANT i16 0
1120    %1:_(s16) = G_CONSTANT i16 1
1121    %2:_(p3) = G_MERGE_VALUES %0, %1
1122    $vgpr0 = COPY %2
1123...
1124
1125---
1126name: test_merge_s32_s16_s16
1127body: |
1128  bb.0:
1129    liveins: $vgpr0, $vgpr1
1130
1131    ; CHECK-LABEL: name: test_merge_s32_s16_s16
1132    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1133    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1134    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1135    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1136    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C]]
1137    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1138    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C]]
1139    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1140    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
1141    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1142    ; CHECK: $vgpr0 = COPY [[OR]](s32)
1143    %0:_(s32) = COPY $vgpr0
1144    %1:_(s32) = COPY $vgpr1
1145    %2:_(s16) = G_TRUNC %0
1146    %3:_(s16) = G_TRUNC %1
1147    %4:_(s32) = G_MERGE_VALUES %2, %3
1148    $vgpr0 = COPY %4
1149...
1150
1151---
1152name: test_merge_s48_s16_s16_s16
1153body: |
1154  bb.0:
1155    liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
1156
1157    ; CHECK-LABEL: name: test_merge_s48_s16_s16_s16
1158    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
1159    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
1160    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY $vgpr2
1161    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
1162    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
1163    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C]]
1164    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
1165    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C]]
1166    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
1167    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
1168    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
1169    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[COPY2]](s32)
1170    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C]]
1171    ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
1172    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[C2]], [[C1]](s32)
1173    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL1]]
1174    ; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
1175    ; CHECK: [[COPY6:%[0-9]+]]:_(s64) = COPY [[MV]](s64)
1176    ; CHECK: $vgpr0_vgpr1 = COPY [[COPY6]](s64)
1177    %0:_(s32) = COPY $vgpr0
1178    %1:_(s32) = COPY $vgpr1
1179    %2:_(s32) = COPY $vgpr2
1180
1181    %3:_(s16) = G_TRUNC %0
1182    %4:_(s16) = G_TRUNC %1
1183    %5:_(s16) = G_TRUNC %2
1184
1185    %6:_(s48) = G_MERGE_VALUES %3, %4, %5
1186    %7:_(s64) = G_ANYEXT %6
1187    $vgpr0_vgpr1 = COPY %7
1188...
1189
1190---
1191
1192name: test_merge_s256_s128
1193body: |
1194  bb.0:
1195    liveins:  $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
1196
1197    ; CHECK-LABEL: name: test_merge_s256_s128
1198    ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1199    ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
1200    ; CHECK: [[MV:%[0-9]+]]:_(s256) = G_MERGE_VALUES [[COPY]](s128), [[COPY1]](s128)
1201    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[MV]](s256)
1202    %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
1203    %1:_(s128) = COPY  $vgpr4_vgpr5_vgpr6_vgpr7
1204    %2:_(s256) = G_MERGE_VALUES %0, %1
1205    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %2
1206...
1207
1208---
1209
1210name: test_merge_s512_s256
1211body: |
1212  bb.0:
1213    liveins:  $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1214
1215    ; CHECK-LABEL: name: test_merge_s512_s256
1216    ; CHECK: [[COPY:%[0-9]+]]:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
1217    ; CHECK: [[COPY1:%[0-9]+]]:_(s256) = COPY $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1218    ; CHECK: [[MV:%[0-9]+]]:_(s512) = G_MERGE_VALUES [[COPY]](s256), [[COPY1]](s256)
1219    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[MV]](s512)
1220    %0:_(s256) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
1221    %1:_(s256) = COPY $vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1222    %2:_(s512) = G_MERGE_VALUES %0, %1
1223    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %2
1224...
1225
1226---
1227
1228name: test_merge_s1024_s512
1229body: |
1230  bb.0:
1231    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15, $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
1232
1233    ; CHECK-LABEL: name: test_merge_s1024_s512
1234    ; CHECK: [[COPY:%[0-9]+]]:_(s512) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1235    ; CHECK: [[COPY1:%[0-9]+]]:_(s512) = COPY $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
1236    ; CHECK: [[MV:%[0-9]+]]:_(s1024) = G_MERGE_VALUES [[COPY]](s512), [[COPY1]](s512)
1237    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY [[MV]](s1024)
1238    %0:_(s512) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15
1239    %1:_(s512) = COPY $vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31
1240    %2:_(s1024) = G_MERGE_VALUES %0, %1
1241    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15_vgpr16_vgpr17_vgpr18_vgpr19_vgpr20_vgpr21_vgpr22_vgpr23_vgpr24_vgpr25_vgpr26_vgpr27_vgpr28_vgpr29_vgpr30_vgpr31 = COPY %2
1242
1243...
1244