1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck %s
3
4---
5name: test_and_s32
6body: |
7  bb.0:
8    liveins: $vgpr0, $vgpr1
9
10    ; CHECK-LABEL: name: test_and_s32
11    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
12    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
13    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]
14    ; CHECK: $vgpr0 = COPY [[AND]](s32)
15    %0:_(s32) = COPY $vgpr0
16    %1:_(s32) = COPY $vgpr1
17    %2:_(s32) = G_AND %0, %1
18    $vgpr0 = COPY %2
19...
20
21---
22name: test_and_s1
23body: |
24  bb.0:
25    liveins: $vgpr0, $vgpr1
26
27    ; CHECK-LABEL: name: test_and_s1
28    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
29    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
30    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]
31    ; CHECK: S_NOP 0, implicit [[AND]](s32)
32    %0:_(s32) = COPY $vgpr0
33    %1:_(s32) = COPY $vgpr1
34    %2:_(s32) = G_CONSTANT i32 0
35    %3:_(s1) = G_ICMP intpred(ne), %0, %2
36    %4:_(s1) = G_ICMP intpred(ne), %1, %2
37    %5:_(s32) = G_AND %0, %1
38    S_NOP 0, implicit %5
39...
40
41---
42name: test_and_v2s1
43body: |
44  bb.0:
45    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5
46
47    ; CHECK-LABEL: name: test_and_v2s1
48    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
49    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
50    ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr4_vgpr5
51    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
52    ; CHECK: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
53    ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV2]]
54    ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV3]]
55    ; CHECK: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
56    ; CHECK: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<2 x s32>)
57    ; CHECK: [[ICMP2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV4]](s32), [[UV6]]
58    ; CHECK: [[ICMP3:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV5]](s32), [[UV7]]
59    ; CHECK: [[AND:%[0-9]+]]:_(s1) = G_AND [[ICMP]], [[ICMP2]]
60    ; CHECK: [[AND1:%[0-9]+]]:_(s1) = G_AND [[ICMP1]], [[ICMP3]]
61    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[AND]](s1)
62    ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[AND1]](s1)
63    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ANYEXT]](s32)
64    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ANYEXT1]](s32)
65    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[COPY3]](s32), [[COPY4]](s32)
66    ; CHECK: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
67    %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
68    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
69    %2:_(<2 x s32>) = COPY $vgpr4_vgpr5
70    %3:_(<2 x s1>) = G_ICMP intpred(ne), %0, %1
71    %4:_(<2 x s1>) = G_ICMP intpred(ne), %0, %2
72    %5:_(<2 x s1>) = G_AND %3, %4
73    %6:_(<2 x s32>) = G_ANYEXT %5
74    $vgpr0_vgpr1 = COPY %6
75...
76
77---
78name: test_and_v3s1
79body: |
80  bb.0:
81    liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5, $vgpr6_vgpr7_vgpr8
82
83    ; CHECK-LABEL: name: test_and_v3s1
84    ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
85    ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
86    ; CHECK: [[COPY2:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr6_vgpr7_vgpr8
87    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
88    ; CHECK: [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
89    ; CHECK: [[ICMP:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV]](s32), [[UV3]]
90    ; CHECK: [[ICMP1:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV1]](s32), [[UV4]]
91    ; CHECK: [[ICMP2:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV2]](s32), [[UV5]]
92    ; CHECK: [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
93    ; CHECK: [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY2]](<3 x s32>)
94    ; CHECK: [[ICMP3:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV6]](s32), [[UV9]]
95    ; CHECK: [[ICMP4:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV7]](s32), [[UV10]]
96    ; CHECK: [[ICMP5:%[0-9]+]]:_(s1) = G_ICMP intpred(ne), [[UV8]](s32), [[UV11]]
97    ; CHECK: [[AND:%[0-9]+]]:_(s1) = G_AND [[ICMP]], [[ICMP3]]
98    ; CHECK: [[AND1:%[0-9]+]]:_(s1) = G_AND [[ICMP1]], [[ICMP4]]
99    ; CHECK: [[AND2:%[0-9]+]]:_(s1) = G_AND [[ICMP2]], [[ICMP5]]
100    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[AND]](s1)
101    ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[AND1]](s1)
102    ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[AND2]](s1)
103    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[ANYEXT]](s32)
104    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[ANYEXT1]](s32)
105    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[ANYEXT2]](s32)
106    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[COPY3]](s32), [[COPY4]](s32), [[COPY5]](s32)
107    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
108    %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
109    %1:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
110    %2:_(<3 x s32>) = COPY $vgpr6_vgpr7_vgpr8
111    %3:_(<3 x s1>) = G_ICMP intpred(ne), %0, %1
112    %4:_(<3 x s1>) = G_ICMP intpred(ne), %0, %2
113    %5:_(<3 x s1>) = G_AND %3, %4
114    %6:_(<3 x s32>) = G_ANYEXT %5
115    $vgpr0_vgpr1_vgpr2 = COPY %6
116...
117
118---
119name: test_and_s64
120body: |
121  bb.0:
122    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
123
124    ; CHECK-LABEL: name: test_and_s64
125    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
126    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
127    ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]
128    ; CHECK: $vgpr0_vgpr1 = COPY [[AND]](s64)
129    %0:_(s64) = COPY $vgpr0_vgpr1
130    %1:_(s64) = COPY $vgpr2_vgpr3
131    %2:_(s64) = G_AND %0, %1
132    $vgpr0_vgpr1 = COPY %2
133...
134
135---
136name: test_and_s96
137body: |
138  bb.0:
139    liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5
140
141    ; CHECK-LABEL: name: test_and_s96
142    ; CHECK: [[COPY:%[0-9]+]]:_(s96) = COPY $vgpr0_vgpr1_vgpr2
143    ; CHECK: [[COPY1:%[0-9]+]]:_(s96) = COPY $vgpr3_vgpr4_vgpr5
144    ; CHECK: [[EXTRACT:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY]](s96), 0
145    ; CHECK: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY]](s96), 64
146    ; CHECK: [[EXTRACT2:%[0-9]+]]:_(s64) = G_EXTRACT [[COPY1]](s96), 0
147    ; CHECK: [[EXTRACT3:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](s96), 64
148    ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[EXTRACT]], [[EXTRACT2]]
149    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[EXTRACT1]], [[EXTRACT3]]
150    ; CHECK: [[DEF:%[0-9]+]]:_(s96) = G_IMPLICIT_DEF
151    ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[DEF]], [[AND]](s64), 0
152    ; CHECK: [[INSERT1:%[0-9]+]]:_(s96) = G_INSERT [[INSERT]], [[AND1]](s32), 64
153    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT1]](s96)
154    %0:_(s96) = COPY $vgpr0_vgpr1_vgpr2
155    %1:_(s96) = COPY $vgpr3_vgpr4_vgpr5
156    %2:_(s96) = G_AND %0, %1
157    $vgpr0_vgpr1_vgpr2 = COPY %2
158...
159
160---
161name: test_and_128
162body: |
163  bb.0:
164    liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
165
166    ; CHECK-LABEL: name: test_and_128
167    ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
168    ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
169    ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](s128)
170    ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](s128)
171    ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[UV]], [[UV2]]
172    ; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[UV1]], [[UV3]]
173    ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[AND]](s64), [[AND1]](s64)
174    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[MV]](s128)
175    %0:_(s128) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
176    %1:_(s128) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
177    %2:_(s128) = G_AND %0, %1
178    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
179...
180
181---
182name: test_and_s7
183body: |
184  bb.0:
185    liveins: $vgpr0, $vgpr1
186
187    ; CHECK-LABEL: name: test_and_s7
188    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
189    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
190    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
191    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
192    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
193    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
194    ; CHECK: $vgpr0 = COPY [[COPY4]](s32)
195    %0:_(s32) = COPY $vgpr0
196    %1:_(s32) = COPY $vgpr1
197    %2:_(s7) = G_TRUNC %0
198    %3:_(s7) = G_TRUNC %1
199    %4:_(s7) = G_AND %2, %3
200    %5:_(s32) = G_ANYEXT %4
201    $vgpr0 = COPY %5
202...
203
204---
205name: test_and_s8
206body: |
207  bb.0:
208    liveins: $vgpr0, $vgpr1
209
210    ; CHECK-LABEL: name: test_and_s8
211    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
212    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
213    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
214    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
215    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
216    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
217    ; CHECK: $vgpr0 = COPY [[COPY4]](s32)
218    %0:_(s32) = COPY $vgpr0
219    %1:_(s32) = COPY $vgpr1
220    %2:_(s8) = G_TRUNC %0
221    %3:_(s8) = G_TRUNC %1
222    %4:_(s8) = G_AND %2, %3
223    %5:_(s32) = G_ANYEXT %4
224    $vgpr0 = COPY %5
225...
226
227---
228name: test_and_s16
229body: |
230  bb.0:
231    liveins: $vgpr0, $vgpr1
232
233    ; CHECK-LABEL: name: test_and_s16
234    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
235    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
236    ; CHECK: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
237    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s16) = G_TRUNC [[COPY1]](s32)
238    ; CHECK: [[AND:%[0-9]+]]:_(s16) = G_AND [[TRUNC]], [[TRUNC1]]
239    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[AND]](s16)
240    ; CHECK: $vgpr0 = COPY [[ANYEXT]](s32)
241    %0:_(s32) = COPY $vgpr0
242    %1:_(s32) = COPY $vgpr1
243    %2:_(s16) = G_TRUNC %0
244    %3:_(s16) = G_TRUNC %1
245    %4:_(s16) = G_AND %2, %3
246    %5:_(s32) = G_ANYEXT %4
247    $vgpr0 = COPY %5
248...
249
250---
251name: test_and_s24
252body: |
253  bb.0:
254    liveins: $vgpr0, $vgpr1
255
256    ; CHECK-LABEL: name: test_and_s24
257    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
258    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY $vgpr1
259    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[COPY]](s32)
260    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[COPY1]](s32)
261    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
262    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
263    ; CHECK: $vgpr0 = COPY [[COPY4]](s32)
264    %0:_(s32) = COPY $vgpr0
265    %1:_(s32) = COPY $vgpr1
266    %2:_(s24) = G_TRUNC %0
267    %3:_(s24) = G_TRUNC %1
268    %4:_(s24) = G_AND %2, %3
269    %5:_(s32) = G_ANYEXT %4
270    $vgpr0 = COPY %5
271...
272
273---
274name: test_and_s48
275body: |
276  bb.0:
277    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
278
279    ; CHECK-LABEL: name: test_and_s48
280    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
281    ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3
282    ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
283    ; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY [[COPY1]](s64)
284    ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[COPY3]]
285    ; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY [[AND]](s64)
286    ; CHECK: $vgpr0_vgpr1 = COPY [[COPY4]](s64)
287    %0:_(s64) = COPY $vgpr0_vgpr1
288    %1:_(s64) = COPY $vgpr2_vgpr3
289    %2:_(s48) = G_TRUNC %0
290    %3:_(s48) = G_TRUNC %1
291    %4:_(s48) = G_AND %2, %3
292    %5:_(s64) = G_ANYEXT %4
293    $vgpr0_vgpr1 = COPY %5
294...
295
296---
297name: test_and_v2s32
298body: |
299  bb.0:
300    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
301
302    ; CHECK-LABEL: name: test_and_v2s32
303    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
304    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr2_vgpr3
305    ; CHECK: [[AND:%[0-9]+]]:_(<2 x s32>) = G_AND [[COPY]], [[COPY1]]
306    ; CHECK: $vgpr0_vgpr1 = COPY [[AND]](<2 x s32>)
307    %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
308    %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
309    %2:_(<2 x s32>) = G_AND %0, %1
310    $vgpr0_vgpr1 = COPY %2
311...
312
313---
314name: test_and_v3s32
315body: |
316  bb.0:
317    liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5
318
319    ; CHECK-LABEL: name: test_and_v3s32
320    ; CHECK: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
321    ; CHECK: [[COPY1:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
322    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
323    ; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
324    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32)
325    ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV2]](s32), [[DEF]](s32)
326    ; CHECK: [[DEF1:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
327    ; CHECK: [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY1]](<3 x s32>)
328    ; CHECK: [[BUILD_VECTOR2:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV3]](s32), [[UV4]](s32)
329    ; CHECK: [[BUILD_VECTOR3:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV5]](s32), [[DEF]](s32)
330    ; CHECK: [[AND:%[0-9]+]]:_(<2 x s32>) = G_AND [[BUILD_VECTOR]], [[BUILD_VECTOR2]]
331    ; CHECK: [[AND1:%[0-9]+]]:_(<2 x s32>) = G_AND [[BUILD_VECTOR1]], [[BUILD_VECTOR3]]
332    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<6 x s32>) = G_CONCAT_VECTORS [[AND]](<2 x s32>), [[AND1]](<2 x s32>), [[DEF1]](<2 x s32>)
333    ; CHECK: [[UV6:%[0-9]+]]:_(<3 x s32>), [[UV7:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<6 x s32>)
334    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[UV6]](<3 x s32>)
335    %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
336    %1:_(<3 x s32>) = COPY $vgpr3_vgpr4_vgpr5
337    %2:_(<3 x s32>) = G_AND %0, %1
338    $vgpr0_vgpr1_vgpr2 = COPY %2
339...
340
341---
342name: test_and_v4s32
343body: |
344  bb.0:
345    liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
346
347    ; CHECK-LABEL: name: test_and_v4s32
348    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
349    ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
350    ; CHECK: [[UV:%[0-9]+]]:_(<2 x s32>), [[UV1:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY]](<4 x s32>)
351    ; CHECK: [[UV2:%[0-9]+]]:_(<2 x s32>), [[UV3:%[0-9]+]]:_(<2 x s32>) = G_UNMERGE_VALUES [[COPY1]](<4 x s32>)
352    ; CHECK: [[AND:%[0-9]+]]:_(<2 x s32>) = G_AND [[UV]], [[UV2]]
353    ; CHECK: [[AND1:%[0-9]+]]:_(<2 x s32>) = G_AND [[UV1]], [[UV3]]
354    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s32>) = G_CONCAT_VECTORS [[AND]](<2 x s32>), [[AND1]](<2 x s32>)
355    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[CONCAT_VECTORS]](<4 x s32>)
356    %0:_(<4 x s32>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
357    %1:_(<4 x s32>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
358    %2:_(<4 x s32>) = G_AND %0, %1
359    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
360...
361
362---
363name: test_and_v5s32
364body: |
365  bb.0:
366
367    ; CHECK-LABEL: name: test_and_v5s32
368    ; CHECK: [[DEF:%[0-9]+]]:_(<5 x s32>) = G_IMPLICIT_DEF
369    ; CHECK: [[DEF1:%[0-9]+]]:_(<5 x s32>) = G_IMPLICIT_DEF
370    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<5 x s32>)
371    ; CHECK: [[DEF2:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
372    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV]](s32), [[UV1]](s32)
373    ; CHECK: [[BUILD_VECTOR1:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV2]](s32), [[UV3]](s32)
374    ; CHECK: [[BUILD_VECTOR2:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV4]](s32), [[DEF2]](s32)
375    ; CHECK: [[DEF3:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
376    ; CHECK: [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](<5 x s32>)
377    ; CHECK: [[BUILD_VECTOR3:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV5]](s32), [[UV6]](s32)
378    ; CHECK: [[BUILD_VECTOR4:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV7]](s32), [[UV8]](s32)
379    ; CHECK: [[BUILD_VECTOR5:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[UV9]](s32), [[DEF2]](s32)
380    ; CHECK: [[AND:%[0-9]+]]:_(<2 x s32>) = G_AND [[BUILD_VECTOR]], [[BUILD_VECTOR3]]
381    ; CHECK: [[AND1:%[0-9]+]]:_(<2 x s32>) = G_AND [[BUILD_VECTOR1]], [[BUILD_VECTOR4]]
382    ; CHECK: [[AND2:%[0-9]+]]:_(<2 x s32>) = G_AND [[BUILD_VECTOR2]], [[BUILD_VECTOR5]]
383    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<10 x s32>) = G_CONCAT_VECTORS [[AND]](<2 x s32>), [[AND1]](<2 x s32>), [[AND2]](<2 x s32>), [[DEF3]](<2 x s32>), [[DEF3]](<2 x s32>)
384    ; CHECK: [[UV10:%[0-9]+]]:_(<5 x s32>), [[UV11:%[0-9]+]]:_(<5 x s32>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<10 x s32>)
385    ; CHECK: [[DEF4:%[0-9]+]]:_(<8 x s32>) = G_IMPLICIT_DEF
386    ; CHECK: [[INSERT:%[0-9]+]]:_(<8 x s32>) = G_INSERT [[DEF4]], [[UV10]](<5 x s32>), 0
387    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[INSERT]](<8 x s32>)
388    %0:_(<5 x s32>) = G_IMPLICIT_DEF
389    %1:_(<5 x s32>) = G_IMPLICIT_DEF
390    %2:_(<5 x s32>) = G_AND %0, %1
391    %3:_(<8 x s32>) = G_IMPLICIT_DEF
392    %4:_(<8 x s32>) = G_INSERT %3, %2, 0
393    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %4
394...
395
396---
397name: test_and_v2s64
398body: |
399  bb.0:
400    liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7
401
402    ; CHECK-LABEL: name: test_and_v2s64
403    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
404    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
405    ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
406    ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>)
407    ; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[UV]], [[UV2]]
408    ; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[UV1]], [[UV3]]
409    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[AND]](s64), [[AND1]](s64)
410    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
411    %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
412    %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7
413    %2:_(<2 x s64>) = G_AND %0, %1
414    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %2
415...
416
417---
418name: test_and_v2s16
419body: |
420  bb.0:
421    liveins: $vgpr0, $vgpr1
422
423    ; CHECK-LABEL: name: test_and_v2s16
424    ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
425    ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr1
426    ; CHECK: [[AND:%[0-9]+]]:_(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
427    ; CHECK: $vgpr0 = COPY [[AND]](<2 x s16>)
428    %0:_(<2 x s16>) = COPY $vgpr0
429    %1:_(<2 x s16>) = COPY $vgpr1
430    %2:_(<2 x s16>) = G_AND %0, %1
431    $vgpr0 = COPY %2
432...
433
434---
435name: test_and_v3s16
436body: |
437  bb.0:
438    liveins: $vgpr0_vgpr1_vgpr2, $vgpr3_vgpr4_vgpr5
439    ; CHECK-LABEL: name: test_and_v3s16
440    ; CHECK: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
441    ; CHECK: [[COPY1:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr3_vgpr4_vgpr5
442    ; CHECK: [[UV:%[0-9]+]]:_(<3 x s16>), [[UV1:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
443    ; CHECK: [[UV2:%[0-9]+]]:_(<3 x s16>), [[UV3:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[COPY1]](<6 x s16>)
444    ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
445    ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV]](<3 x s16>), 0
446    ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF]], [[UV2]](<3 x s16>), 0
447    ; CHECK: [[AND:%[0-9]+]]:_(<4 x s16>) = G_AND [[INSERT]], [[INSERT1]]
448    ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
449    ; CHECK: [[UV4:%[0-9]+]]:_(<2 x s16>), [[UV5:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[AND]](<4 x s16>)
450    ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV4]](<2 x s16>)
451    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
452    ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
453    ; CHECK: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV5]](<2 x s16>)
454    ; CHECK: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
455    ; CHECK: [[UV6:%[0-9]+]]:_(<2 x s16>), [[UV7:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF1]](<4 x s16>)
456    ; CHECK: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV6]](<2 x s16>)
457    ; CHECK: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
458    ; CHECK: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[UV7]](<2 x s16>)
459    ; CHECK: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C]](s32)
460    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
461    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
462    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C1]]
463    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
464    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C1]]
465    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C]](s32)
466    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[SHL]]
467    ; CHECK: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
468    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
469    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C1]]
470    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[BITCAST2]](s32)
471    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C1]]
472    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND4]], [[C]](s32)
473    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND3]], [[SHL1]]
474    ; CHECK: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
475    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
476    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C1]]
477    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[BITCAST3]](s32)
478    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY7]], [[C1]]
479    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C]](s32)
480    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND5]], [[SHL2]]
481    ; CHECK: [[BITCAST6:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
482    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<6 x s16>) = G_CONCAT_VECTORS [[BITCAST4]](<2 x s16>), [[BITCAST5]](<2 x s16>), [[BITCAST6]](<2 x s16>)
483    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[CONCAT_VECTORS]](<6 x s16>)
484    %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
485    %1:_(<6 x s16>) = COPY $vgpr3_vgpr4_vgpr5
486    %2:_(<3 x s16>), %3:_(<3 x s16>) = G_UNMERGE_VALUES %0
487    %4:_(<3 x s16>), %5:_(<3 x s16>) = G_UNMERGE_VALUES %1
488    %6:_(<3 x s16>) = G_AND %2, %4
489    %7:_(<3 x s16>) = G_IMPLICIT_DEF
490    %8:_(<6 x s16>) = G_CONCAT_VECTORS %6, %7
491    $vgpr0_vgpr1_vgpr2 = COPY %8
492
493...
494
495---
496name: test_and_v4s16
497body: |
498  bb.0:
499    liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
500
501    ; CHECK-LABEL: name: test_and_v4s16
502    ; CHECK: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
503    ; CHECK: [[COPY1:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr2_vgpr3
504    ; CHECK: [[AND:%[0-9]+]]:_(<4 x s16>) = G_AND [[COPY]], [[COPY1]]
505    ; CHECK: $vgpr0_vgpr1 = COPY [[AND]](<4 x s16>)
506    %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
507    %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
508    %2:_(<4 x s16>) = G_AND %0, %1
509    $vgpr0_vgpr1 = COPY %2
510...
511
512---
513name: test_and_v5s16
514body: |
515  bb.0:
516
517    ; CHECK-LABEL: name: test_and_v5s16
518    ; CHECK: [[DEF:%[0-9]+]]:_(<6 x s16>) = G_IMPLICIT_DEF
519    ; CHECK: [[DEF1:%[0-9]+]]:_(<6 x s16>) = G_IMPLICIT_DEF
520    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<30 x s16>) = G_CONCAT_VECTORS [[DEF]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>)
521    ; CHECK: [[UV:%[0-9]+]]:_(<5 x s16>), [[UV1:%[0-9]+]]:_(<5 x s16>), [[UV2:%[0-9]+]]:_(<5 x s16>), [[UV3:%[0-9]+]]:_(<5 x s16>), [[UV4:%[0-9]+]]:_(<5 x s16>), [[UV5:%[0-9]+]]:_(<5 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<30 x s16>)
522    ; CHECK: [[DEF2:%[0-9]+]]:_(<6 x s16>) = G_IMPLICIT_DEF
523    ; CHECK: [[CONCAT_VECTORS1:%[0-9]+]]:_(<30 x s16>) = G_CONCAT_VECTORS [[DEF2]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>)
524    ; CHECK: [[UV6:%[0-9]+]]:_(<5 x s16>), [[UV7:%[0-9]+]]:_(<5 x s16>), [[UV8:%[0-9]+]]:_(<5 x s16>), [[UV9:%[0-9]+]]:_(<5 x s16>), [[UV10:%[0-9]+]]:_(<5 x s16>), [[UV11:%[0-9]+]]:_(<5 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS1]](<30 x s16>)
525    ; CHECK: [[INSERT:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[DEF1]], [[UV]](<5 x s16>), 0
526    ; CHECK: [[INSERT1:%[0-9]+]]:_(<6 x s16>) = G_INSERT [[DEF1]], [[UV6]](<5 x s16>), 0
527    ; CHECK: [[UV12:%[0-9]+]]:_(<3 x s16>), [[UV13:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[INSERT]](<6 x s16>)
528    ; CHECK: [[UV14:%[0-9]+]]:_(<3 x s16>), [[UV15:%[0-9]+]]:_(<3 x s16>) = G_UNMERGE_VALUES [[INSERT1]](<6 x s16>)
529    ; CHECK: [[DEF3:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
530    ; CHECK: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[UV12]](<3 x s16>), 0
531    ; CHECK: [[INSERT3:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[UV14]](<3 x s16>), 0
532    ; CHECK: [[AND:%[0-9]+]]:_(<4 x s16>) = G_AND [[INSERT2]], [[INSERT3]]
533    ; CHECK: [[INSERT4:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[UV13]](<3 x s16>), 0
534    ; CHECK: [[INSERT5:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[UV15]](<3 x s16>), 0
535    ; CHECK: [[AND1:%[0-9]+]]:_(<4 x s16>) = G_AND [[INSERT4]], [[INSERT5]]
536    ; CHECK: [[UV16:%[0-9]+]]:_(<2 x s16>), [[UV17:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[AND]](<4 x s16>)
537    ; CHECK: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV16]](<2 x s16>)
538    ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
539    ; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
540    ; CHECK: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV17]](<2 x s16>)
541    ; CHECK: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C]](s32)
542    ; CHECK: [[UV18:%[0-9]+]]:_(<2 x s16>), [[UV19:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[AND1]](<4 x s16>)
543    ; CHECK: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV18]](<2 x s16>)
544    ; CHECK: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
545    ; CHECK: [[BITCAST3:%[0-9]+]]:_(s32) = G_BITCAST [[UV19]](<2 x s16>)
546    ; CHECK: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST3]], [[C]](s32)
547    ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
548    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[BITCAST]](s32)
549    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C1]]
550    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
551    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C1]]
552    ; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C]](s32)
553    ; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL]]
554    ; CHECK: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
555    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[BITCAST1]](s32)
556    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[C1]]
557    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[BITCAST2]](s32)
558    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY3]], [[C1]]
559    ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C]](s32)
560    ; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[AND4]], [[SHL1]]
561    ; CHECK: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
562    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
563    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[C1]]
564    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[BITCAST3]](s32)
565    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY5]], [[C1]]
566    ; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C]](s32)
567    ; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND6]], [[SHL2]]
568    ; CHECK: [[BITCAST6:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
569    ; CHECK: [[CONCAT_VECTORS2:%[0-9]+]]:_(<6 x s16>) = G_CONCAT_VECTORS [[BITCAST4]](<2 x s16>), [[BITCAST5]](<2 x s16>), [[BITCAST6]](<2 x s16>)
570    ; CHECK: [[CONCAT_VECTORS3:%[0-9]+]]:_(<30 x s16>) = G_CONCAT_VECTORS [[CONCAT_VECTORS2]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>), [[DEF1]](<6 x s16>)
571    ; CHECK: [[UV20:%[0-9]+]]:_(<5 x s16>), [[UV21:%[0-9]+]]:_(<5 x s16>), [[UV22:%[0-9]+]]:_(<5 x s16>), [[UV23:%[0-9]+]]:_(<5 x s16>), [[UV24:%[0-9]+]]:_(<5 x s16>), [[UV25:%[0-9]+]]:_(<5 x s16>) = G_UNMERGE_VALUES [[CONCAT_VECTORS3]](<30 x s16>)
572    ; CHECK: [[DEF4:%[0-9]+]]:_(<8 x s16>) = G_IMPLICIT_DEF
573    ; CHECK: [[INSERT6:%[0-9]+]]:_(<8 x s16>) = G_INSERT [[DEF4]], [[UV20]](<5 x s16>), 0
574    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[INSERT6]](<8 x s16>)
575    %0:_(<5 x s16>) = G_IMPLICIT_DEF
576    %1:_(<5 x s16>) = G_IMPLICIT_DEF
577    %2:_(<5 x s16>) = G_AND %0, %1
578    %3:_(<8 x s16>) = G_IMPLICIT_DEF
579    %4:_(<8 x s16>) = G_INSERT %3, %2, 0
580    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
581...
582
583---
584name: test_and_v3s8
585body: |
586  bb.0:
587
588    ; CHECK-LABEL: name: test_and_v3s8
589    ; CHECK: [[DEF:%[0-9]+]]:_(<3 x s8>) = G_IMPLICIT_DEF
590    ; CHECK: [[DEF1:%[0-9]+]]:_(<3 x s8>) = G_IMPLICIT_DEF
591    ; CHECK: [[DEF2:%[0-9]+]]:_(<4 x s8>) = G_IMPLICIT_DEF
592    ; CHECK: [[INSERT:%[0-9]+]]:_(<4 x s8>) = G_INSERT [[DEF2]], [[DEF]](<3 x s8>), 0
593    ; CHECK: [[INSERT1:%[0-9]+]]:_(<4 x s8>) = G_INSERT [[DEF2]], [[DEF1]](<3 x s8>), 0
594    ; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[INSERT]](<4 x s8>)
595    ; CHECK: [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[INSERT1]](<4 x s8>)
596    ; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
597    ; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV4]](s8)
598    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[ANYEXT]], [[ANYEXT1]]
599    ; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[AND]](s32)
600    ; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s8)
601    ; CHECK: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[UV5]](s8)
602    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ANYEXT2]], [[ANYEXT3]]
603    ; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[AND1]](s32)
604    ; CHECK: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
605    ; CHECK: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[UV6]](s8)
606    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[ANYEXT4]], [[ANYEXT5]]
607    ; CHECK: [[TRUNC2:%[0-9]+]]:_(s8) = G_TRUNC [[AND2]](s32)
608    ; CHECK: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s8)
609    ; CHECK: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[UV7]](s8)
610    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[ANYEXT6]], [[ANYEXT7]]
611    ; CHECK: [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[AND3]](s32)
612    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s8>) = G_BUILD_VECTOR [[TRUNC]](s8), [[TRUNC1]](s8), [[TRUNC2]](s8), [[TRUNC3]](s8)
613    ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:_(<12 x s8>) = G_CONCAT_VECTORS [[BUILD_VECTOR]](<4 x s8>), [[DEF2]](<4 x s8>), [[DEF2]](<4 x s8>)
614    ; CHECK: [[UV8:%[0-9]+]]:_(<3 x s8>), [[UV9:%[0-9]+]]:_(<3 x s8>), [[UV10:%[0-9]+]]:_(<3 x s8>), [[UV11:%[0-9]+]]:_(<3 x s8>) = G_UNMERGE_VALUES [[CONCAT_VECTORS]](<12 x s8>)
615    ; CHECK: [[ANYEXT8:%[0-9]+]]:_(<3 x s32>) = G_ANYEXT [[UV8]](<3 x s8>)
616    ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[ANYEXT8]](<3 x s32>)
617    %0:_(<3 x s8>) = G_IMPLICIT_DEF
618    %1:_(<3 x s8>) = G_IMPLICIT_DEF
619    %2:_(<3 x s8>) = G_AND %0, %1
620    %3:_(<3 x s32>) = G_ANYEXT %2
621    $vgpr0_vgpr1_vgpr2 = COPY %3
622...
623
624---
625name: test_and_v4s8
626body: |
627  bb.0:
628
629    ; CHECK-LABEL: name: test_and_v4s8
630    ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
631    ; CHECK: [[DEF1:%[0-9]+]]:_(<4 x s32>) = G_IMPLICIT_DEF
632    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<4 x s32>)
633    ; CHECK: [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](<4 x s32>)
634    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
635    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
636    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]
637    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
638    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
639    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
640    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
641    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
642    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[COPY5]]
643    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
644    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
645    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[COPY7]]
646    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
647    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[AND1]](s32)
648    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[AND2]](s32)
649    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[AND3]](s32)
650    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[COPY8]](s32)
651    ; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[COPY9]](s32)
652    ; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[COPY10]](s32)
653    ; CHECK: [[COPY15:%[0-9]+]]:_(s32) = COPY [[COPY11]](s32)
654    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY12]](s32), [[COPY13]](s32), [[COPY14]](s32), [[COPY15]](s32)
655    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
656    %0:_(<4 x s8>) = G_IMPLICIT_DEF
657    %1:_(<4 x s8>) = G_IMPLICIT_DEF
658    %2:_(<4 x s8>) = G_AND %0, %1
659    %3:_(<4 x s32>) = G_ANYEXT %2
660    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3
661...
662
663---
664name: test_and_v8s8
665body: |
666  bb.0:
667
668    ; CHECK-LABEL: name: test_and_v8s8
669    ; CHECK: [[DEF:%[0-9]+]]:_(<8 x s32>) = G_IMPLICIT_DEF
670    ; CHECK: [[DEF1:%[0-9]+]]:_(<8 x s32>) = G_IMPLICIT_DEF
671    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<8 x s32>)
672    ; CHECK: [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](<8 x s32>)
673    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
674    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV8]](s32)
675    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]
676    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
677    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV9]](s32)
678    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
679    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
680    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[UV10]](s32)
681    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[COPY5]]
682    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
683    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV11]](s32)
684    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[COPY7]]
685    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
686    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV12]](s32)
687    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[COPY9]]
688    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
689    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[UV13]](s32)
690    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[COPY11]]
691    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
692    ; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV14]](s32)
693    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY12]], [[COPY13]]
694    ; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
695    ; CHECK: [[COPY15:%[0-9]+]]:_(s32) = COPY [[UV15]](s32)
696    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[COPY15]]
697    ; CHECK: [[COPY16:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
698    ; CHECK: [[COPY17:%[0-9]+]]:_(s32) = COPY [[AND1]](s32)
699    ; CHECK: [[COPY18:%[0-9]+]]:_(s32) = COPY [[AND2]](s32)
700    ; CHECK: [[COPY19:%[0-9]+]]:_(s32) = COPY [[AND3]](s32)
701    ; CHECK: [[COPY20:%[0-9]+]]:_(s32) = COPY [[AND4]](s32)
702    ; CHECK: [[COPY21:%[0-9]+]]:_(s32) = COPY [[AND5]](s32)
703    ; CHECK: [[COPY22:%[0-9]+]]:_(s32) = COPY [[AND6]](s32)
704    ; CHECK: [[COPY23:%[0-9]+]]:_(s32) = COPY [[AND7]](s32)
705    ; CHECK: [[COPY24:%[0-9]+]]:_(s32) = COPY [[COPY16]](s32)
706    ; CHECK: [[COPY25:%[0-9]+]]:_(s32) = COPY [[COPY17]](s32)
707    ; CHECK: [[COPY26:%[0-9]+]]:_(s32) = COPY [[COPY18]](s32)
708    ; CHECK: [[COPY27:%[0-9]+]]:_(s32) = COPY [[COPY19]](s32)
709    ; CHECK: [[COPY28:%[0-9]+]]:_(s32) = COPY [[COPY20]](s32)
710    ; CHECK: [[COPY29:%[0-9]+]]:_(s32) = COPY [[COPY21]](s32)
711    ; CHECK: [[COPY30:%[0-9]+]]:_(s32) = COPY [[COPY22]](s32)
712    ; CHECK: [[COPY31:%[0-9]+]]:_(s32) = COPY [[COPY23]](s32)
713    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<8 x s32>) = G_BUILD_VECTOR [[COPY24]](s32), [[COPY25]](s32), [[COPY26]](s32), [[COPY27]](s32), [[COPY28]](s32), [[COPY29]](s32), [[COPY30]](s32), [[COPY31]](s32)
714    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR]](<8 x s32>)
715    %0:_(<8 x s8>) = G_IMPLICIT_DEF
716    %1:_(<8 x s8>) = G_IMPLICIT_DEF
717    %2:_(<8 x s8>) = G_AND %0, %1
718    %3:_(<8 x s32>) = G_ANYEXT %2
719    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7 = COPY %3
720...
721
722---
723name: test_and_v16s8
724body: |
725  bb.0:
726
727    ; CHECK-LABEL: name: test_and_v16s8
728    ; CHECK: [[DEF:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
729    ; CHECK: [[DEF1:%[0-9]+]]:_(<16 x s32>) = G_IMPLICIT_DEF
730    ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32), [[UV4:%[0-9]+]]:_(s32), [[UV5:%[0-9]+]]:_(s32), [[UV6:%[0-9]+]]:_(s32), [[UV7:%[0-9]+]]:_(s32), [[UV8:%[0-9]+]]:_(s32), [[UV9:%[0-9]+]]:_(s32), [[UV10:%[0-9]+]]:_(s32), [[UV11:%[0-9]+]]:_(s32), [[UV12:%[0-9]+]]:_(s32), [[UV13:%[0-9]+]]:_(s32), [[UV14:%[0-9]+]]:_(s32), [[UV15:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
731    ; CHECK: [[UV16:%[0-9]+]]:_(s32), [[UV17:%[0-9]+]]:_(s32), [[UV18:%[0-9]+]]:_(s32), [[UV19:%[0-9]+]]:_(s32), [[UV20:%[0-9]+]]:_(s32), [[UV21:%[0-9]+]]:_(s32), [[UV22:%[0-9]+]]:_(s32), [[UV23:%[0-9]+]]:_(s32), [[UV24:%[0-9]+]]:_(s32), [[UV25:%[0-9]+]]:_(s32), [[UV26:%[0-9]+]]:_(s32), [[UV27:%[0-9]+]]:_(s32), [[UV28:%[0-9]+]]:_(s32), [[UV29:%[0-9]+]]:_(s32), [[UV30:%[0-9]+]]:_(s32), [[UV31:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](<16 x s32>)
732    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[UV]](s32)
733    ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[UV16]](s32)
734    ; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]
735    ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[UV1]](s32)
736    ; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[UV17]](s32)
737    ; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY2]], [[COPY3]]
738    ; CHECK: [[COPY4:%[0-9]+]]:_(s32) = COPY [[UV2]](s32)
739    ; CHECK: [[COPY5:%[0-9]+]]:_(s32) = COPY [[UV18]](s32)
740    ; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY4]], [[COPY5]]
741    ; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[UV3]](s32)
742    ; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[UV19]](s32)
743    ; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[COPY7]]
744    ; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[UV4]](s32)
745    ; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[UV20]](s32)
746    ; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[COPY9]]
747    ; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[UV5]](s32)
748    ; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[UV21]](s32)
749    ; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY10]], [[COPY11]]
750    ; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[UV6]](s32)
751    ; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[UV22]](s32)
752    ; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY12]], [[COPY13]]
753    ; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[UV7]](s32)
754    ; CHECK: [[COPY15:%[0-9]+]]:_(s32) = COPY [[UV23]](s32)
755    ; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[COPY15]]
756    ; CHECK: [[COPY16:%[0-9]+]]:_(s32) = COPY [[AND]](s32)
757    ; CHECK: [[COPY17:%[0-9]+]]:_(s32) = COPY [[AND1]](s32)
758    ; CHECK: [[COPY18:%[0-9]+]]:_(s32) = COPY [[AND2]](s32)
759    ; CHECK: [[COPY19:%[0-9]+]]:_(s32) = COPY [[AND3]](s32)
760    ; CHECK: [[COPY20:%[0-9]+]]:_(s32) = COPY [[AND4]](s32)
761    ; CHECK: [[COPY21:%[0-9]+]]:_(s32) = COPY [[AND5]](s32)
762    ; CHECK: [[COPY22:%[0-9]+]]:_(s32) = COPY [[AND6]](s32)
763    ; CHECK: [[COPY23:%[0-9]+]]:_(s32) = COPY [[AND7]](s32)
764    ; CHECK: [[UV32:%[0-9]+]]:_(s32), [[UV33:%[0-9]+]]:_(s32), [[UV34:%[0-9]+]]:_(s32), [[UV35:%[0-9]+]]:_(s32), [[UV36:%[0-9]+]]:_(s32), [[UV37:%[0-9]+]]:_(s32), [[UV38:%[0-9]+]]:_(s32), [[UV39:%[0-9]+]]:_(s32), [[UV40:%[0-9]+]]:_(s32), [[UV41:%[0-9]+]]:_(s32), [[UV42:%[0-9]+]]:_(s32), [[UV43:%[0-9]+]]:_(s32), [[UV44:%[0-9]+]]:_(s32), [[UV45:%[0-9]+]]:_(s32), [[UV46:%[0-9]+]]:_(s32), [[UV47:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](<16 x s32>)
765    ; CHECK: [[UV48:%[0-9]+]]:_(s32), [[UV49:%[0-9]+]]:_(s32), [[UV50:%[0-9]+]]:_(s32), [[UV51:%[0-9]+]]:_(s32), [[UV52:%[0-9]+]]:_(s32), [[UV53:%[0-9]+]]:_(s32), [[UV54:%[0-9]+]]:_(s32), [[UV55:%[0-9]+]]:_(s32), [[UV56:%[0-9]+]]:_(s32), [[UV57:%[0-9]+]]:_(s32), [[UV58:%[0-9]+]]:_(s32), [[UV59:%[0-9]+]]:_(s32), [[UV60:%[0-9]+]]:_(s32), [[UV61:%[0-9]+]]:_(s32), [[UV62:%[0-9]+]]:_(s32), [[UV63:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](<16 x s32>)
766    ; CHECK: [[COPY24:%[0-9]+]]:_(s32) = COPY [[UV40]](s32)
767    ; CHECK: [[COPY25:%[0-9]+]]:_(s32) = COPY [[UV56]](s32)
768    ; CHECK: [[AND8:%[0-9]+]]:_(s32) = G_AND [[COPY24]], [[COPY25]]
769    ; CHECK: [[COPY26:%[0-9]+]]:_(s32) = COPY [[UV41]](s32)
770    ; CHECK: [[COPY27:%[0-9]+]]:_(s32) = COPY [[UV57]](s32)
771    ; CHECK: [[AND9:%[0-9]+]]:_(s32) = G_AND [[COPY26]], [[COPY27]]
772    ; CHECK: [[COPY28:%[0-9]+]]:_(s32) = COPY [[UV42]](s32)
773    ; CHECK: [[COPY29:%[0-9]+]]:_(s32) = COPY [[UV58]](s32)
774    ; CHECK: [[AND10:%[0-9]+]]:_(s32) = G_AND [[COPY28]], [[COPY29]]
775    ; CHECK: [[COPY30:%[0-9]+]]:_(s32) = COPY [[UV43]](s32)
776    ; CHECK: [[COPY31:%[0-9]+]]:_(s32) = COPY [[UV59]](s32)
777    ; CHECK: [[AND11:%[0-9]+]]:_(s32) = G_AND [[COPY30]], [[COPY31]]
778    ; CHECK: [[COPY32:%[0-9]+]]:_(s32) = COPY [[UV44]](s32)
779    ; CHECK: [[COPY33:%[0-9]+]]:_(s32) = COPY [[UV60]](s32)
780    ; CHECK: [[AND12:%[0-9]+]]:_(s32) = G_AND [[COPY32]], [[COPY33]]
781    ; CHECK: [[COPY34:%[0-9]+]]:_(s32) = COPY [[UV45]](s32)
782    ; CHECK: [[COPY35:%[0-9]+]]:_(s32) = COPY [[UV61]](s32)
783    ; CHECK: [[AND13:%[0-9]+]]:_(s32) = G_AND [[COPY34]], [[COPY35]]
784    ; CHECK: [[COPY36:%[0-9]+]]:_(s32) = COPY [[UV46]](s32)
785    ; CHECK: [[COPY37:%[0-9]+]]:_(s32) = COPY [[UV62]](s32)
786    ; CHECK: [[AND14:%[0-9]+]]:_(s32) = G_AND [[COPY36]], [[COPY37]]
787    ; CHECK: [[COPY38:%[0-9]+]]:_(s32) = COPY [[UV47]](s32)
788    ; CHECK: [[COPY39:%[0-9]+]]:_(s32) = COPY [[UV63]](s32)
789    ; CHECK: [[AND15:%[0-9]+]]:_(s32) = G_AND [[COPY38]], [[COPY39]]
790    ; CHECK: [[COPY40:%[0-9]+]]:_(s32) = COPY [[AND8]](s32)
791    ; CHECK: [[COPY41:%[0-9]+]]:_(s32) = COPY [[AND9]](s32)
792    ; CHECK: [[COPY42:%[0-9]+]]:_(s32) = COPY [[AND10]](s32)
793    ; CHECK: [[COPY43:%[0-9]+]]:_(s32) = COPY [[AND11]](s32)
794    ; CHECK: [[COPY44:%[0-9]+]]:_(s32) = COPY [[AND12]](s32)
795    ; CHECK: [[COPY45:%[0-9]+]]:_(s32) = COPY [[AND13]](s32)
796    ; CHECK: [[COPY46:%[0-9]+]]:_(s32) = COPY [[AND14]](s32)
797    ; CHECK: [[COPY47:%[0-9]+]]:_(s32) = COPY [[AND15]](s32)
798    ; CHECK: [[COPY48:%[0-9]+]]:_(s32) = COPY [[COPY16]](s32)
799    ; CHECK: [[COPY49:%[0-9]+]]:_(s32) = COPY [[COPY17]](s32)
800    ; CHECK: [[COPY50:%[0-9]+]]:_(s32) = COPY [[COPY18]](s32)
801    ; CHECK: [[COPY51:%[0-9]+]]:_(s32) = COPY [[COPY19]](s32)
802    ; CHECK: [[COPY52:%[0-9]+]]:_(s32) = COPY [[COPY20]](s32)
803    ; CHECK: [[COPY53:%[0-9]+]]:_(s32) = COPY [[COPY21]](s32)
804    ; CHECK: [[COPY54:%[0-9]+]]:_(s32) = COPY [[COPY22]](s32)
805    ; CHECK: [[COPY55:%[0-9]+]]:_(s32) = COPY [[COPY23]](s32)
806    ; CHECK: [[COPY56:%[0-9]+]]:_(s32) = COPY [[COPY40]](s32)
807    ; CHECK: [[COPY57:%[0-9]+]]:_(s32) = COPY [[COPY41]](s32)
808    ; CHECK: [[COPY58:%[0-9]+]]:_(s32) = COPY [[COPY42]](s32)
809    ; CHECK: [[COPY59:%[0-9]+]]:_(s32) = COPY [[COPY43]](s32)
810    ; CHECK: [[COPY60:%[0-9]+]]:_(s32) = COPY [[COPY44]](s32)
811    ; CHECK: [[COPY61:%[0-9]+]]:_(s32) = COPY [[COPY45]](s32)
812    ; CHECK: [[COPY62:%[0-9]+]]:_(s32) = COPY [[COPY46]](s32)
813    ; CHECK: [[COPY63:%[0-9]+]]:_(s32) = COPY [[COPY47]](s32)
814    ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<16 x s32>) = G_BUILD_VECTOR [[COPY48]](s32), [[COPY49]](s32), [[COPY50]](s32), [[COPY51]](s32), [[COPY52]](s32), [[COPY53]](s32), [[COPY54]](s32), [[COPY55]](s32), [[COPY56]](s32), [[COPY57]](s32), [[COPY58]](s32), [[COPY59]](s32), [[COPY60]](s32), [[COPY61]](s32), [[COPY62]](s32), [[COPY63]](s32)
815    ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY [[BUILD_VECTOR]](<16 x s32>)
816    %0:_(<16 x s8>) = G_IMPLICIT_DEF
817    %1:_(<16 x s8>) = G_IMPLICIT_DEF
818    %2:_(<16 x s8>) = G_AND %0, %1
819    %3:_(<16 x s32>) = G_ANYEXT %2
820    $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7_vgpr8_vgpr9_vgpr10_vgpr11_vgpr12_vgpr13_vgpr14_vgpr15 = COPY %3
821...
822