1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
11 liveins: $sgpr0, $sgpr1
12 ; CHECK-LABEL: name: and_s32_ss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; CHECK: [[AND:%[0-9]+]]:sgpr(s32) = G_AND [[COPY]], [[COPY1]]
16 %0:_(s32) = COPY $sgpr0
17 %1:_(s32) = COPY $sgpr1
18 %2:_(s32) = G_AND %0, %1
27 liveins: $sgpr0, $vgpr0
28 ; CHECK-LABEL: name: and_s32_sv
29 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
30 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
31 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY1]]
32 %0:_(s32) = COPY $sgpr0
33 %1:_(s32) = COPY $vgpr0
34 %2:_(s32) = G_AND %0, %1
43 liveins: $sgpr0, $vgpr0
44 ; CHECK-LABEL: name: and_s32_vs
45 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
46 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
47 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
48 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY2]]
49 %0:_(s32) = COPY $vgpr0
50 %1:_(s32) = COPY $sgpr0
51 %2:_(s32) = G_AND %0, %1
60 liveins: $vgpr0, $vgpr1
61 ; CHECK-LABEL: name: and_s32_vv
62 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
63 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
64 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY1]]
65 %0:_(s32) = COPY $vgpr0
66 %1:_(s32) = COPY $vgpr1
67 %2:_(s32) = G_AND %0, %1
76 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
77 ; CHECK-LABEL: name: and_s64_ss
78 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
79 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
80 ; CHECK: [[AND:%[0-9]+]]:sgpr(s64) = G_AND [[COPY]], [[COPY1]]
81 %0:_(s64) = COPY $sgpr0_sgpr1
82 %1:_(s64) = COPY $sgpr2_sgpr3
83 %2:_(s64) = G_AND %0, %1
92 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
93 ; CHECK-LABEL: name: and_s64_sv
94 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
95 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
96 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
97 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
98 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
99 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
100 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
101 %0:_(s64) = COPY $sgpr0_sgpr1
102 %1:_(s64) = COPY $vgpr0_vgpr1
103 %2:_(s64) = G_AND %0, %1
112 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
113 ; CHECK-LABEL: name: and_s64_vs
114 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
115 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
116 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
117 ; CHECK: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
118 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
119 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
120 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
121 %0:_(s64) = COPY $vgpr0_vgpr1
122 %1:_(s64) = COPY $sgpr0_sgpr1
123 %2:_(s64) = G_AND %0, %1
132 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
133 ; CHECK-LABEL: name: and_s64_vv
134 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
135 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
136 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
137 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
138 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
139 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
140 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
141 %0:_(s64) = COPY $vgpr0_vgpr1
142 %1:_(s64) = COPY $vgpr2_vgpr3
143 %2:_(s64) = G_AND %0, %1
147 name: and_s64_vv_user
152 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
153 ; CHECK-LABEL: name: and_s64_vv_user
154 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
155 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
156 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
157 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
158 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
159 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
160 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
161 ; CHECK: S_NOP 0, implicit [[MV]](s64)
162 %0:_(s64) = COPY $vgpr0_vgpr1
163 %1:_(s64) = COPY $vgpr2_vgpr3
164 %2:_(s64) = G_AND %0, %1
168 name: and_s64_ss_ss_merge
173 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
174 ; CHECK-LABEL: name: and_s64_ss_ss_merge
175 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
176 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
177 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
178 ; CHECK: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
179 ; CHECK: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
180 ; CHECK: [[MV1:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
181 ; CHECK: [[AND:%[0-9]+]]:sgpr(s64) = G_AND [[MV]], [[MV1]]
182 ; CHECK: S_NOP 0, implicit [[AND]](s64)
183 %0:_(s32) = COPY $sgpr0
184 %1:_(s32) = COPY $sgpr1
185 %2:_(s32) = COPY $sgpr2
186 %3:_(s32) = COPY $sgpr3
187 %4:_(s64) = G_MERGE_VALUES %0, %1
188 %5:_(s64) = G_MERGE_VALUES %2, %3
189 %6:_(s64) = G_AND %4, %5
194 name: and_s64_vv_vv_merge
199 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
200 ; CHECK-LABEL: name: and_s64_vv_vv_merge
201 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
202 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
203 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
204 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr3
205 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
206 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
207 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
208 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
209 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
210 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
211 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
212 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
213 %0:_(s32) = COPY $vgpr0
214 %1:_(s32) = COPY $vgpr1
215 %2:_(s32) = COPY $vgpr2
216 %3:_(s32) = COPY $vgpr3
217 %4:_(s64) = G_MERGE_VALUES %0, %1
218 %5:_(s64) = G_MERGE_VALUES %2, %3
219 %6:_(s64) = G_AND %4, %5
224 name: and_s64_s_sv_merge
229 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
230 ; CHECK-LABEL: name: and_s64_s_sv_merge
231 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
232 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
233 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
234 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
235 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY2]](s32)
236 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
237 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
238 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
239 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
240 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
241 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
242 %0:_(s64) = COPY $sgpr0_sgpr1
243 %1:_(s32) = COPY $sgpr2
244 %2:_(s32) = COPY $vgpr0
245 %3:_(s64) = G_MERGE_VALUES %1, %2
246 %4:_(s64) = G_AND %0, %3
251 name: and_s64_s_vs_merge
256 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
257 ; CHECK-LABEL: name: and_s64_s_vs_merge
258 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
259 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
260 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
261 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
262 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
263 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
264 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
265 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
266 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
267 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
268 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
269 %0:_(s64) = COPY $sgpr0_sgpr1
270 %1:_(s32) = COPY $sgpr2
271 %2:_(s32) = COPY $vgpr0
272 %3:_(s64) = G_MERGE_VALUES %2, %1
273 %4:_(s64) = G_AND %0, %3
278 name: and_s64_sv_sv_merge
283 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
284 ; CHECK-LABEL: name: and_s64_sv_sv_merge
285 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
286 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
287 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
288 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
289 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
290 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
291 ; CHECK: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
292 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY5]](s32), [[COPY3]](s32)
293 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
294 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
295 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
296 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
297 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
298 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
299 %0:_(s32) = COPY $sgpr0
300 %1:_(s32) = COPY $sgpr1
301 %2:_(s32) = COPY $vgpr0
302 %3:_(s32) = COPY $vgpr1
303 %4:_(s64) = G_MERGE_VALUES %0, %2
304 %5:_(s64) = G_MERGE_VALUES %1, %3
305 %6:_(s64) = G_AND %4, %5
310 name: and_s64_sv_vs_merge
315 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
316 ; CHECK-LABEL: name: and_s64_sv_vs_merge
317 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
318 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
319 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
320 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
321 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
322 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
323 ; CHECK: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
324 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY5]](s32)
325 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
326 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
327 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
328 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
329 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
330 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
331 %0:_(s32) = COPY $sgpr0
332 %1:_(s32) = COPY $sgpr1
333 %2:_(s32) = COPY $vgpr0
334 %3:_(s32) = COPY $vgpr1
335 %4:_(s64) = G_MERGE_VALUES %0, %2
336 %5:_(s64) = G_MERGE_VALUES %3, %1
337 %6:_(s64) = G_AND %4, %5
342 name: and_chain_s64_sv
347 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $vgpr0_vgpr1
348 ; CHECK-LABEL: name: and_chain_s64_sv
349 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
350 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
351 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
352 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
353 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY2]](s64)
354 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
355 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
356 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
357 ; CHECK: [[UV4:%[0-9]+]]:sgpr(s32), [[UV5:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
358 ; CHECK: [[UV6:%[0-9]+]]:vgpr(s32), [[UV7:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
359 ; CHECK: [[AND2:%[0-9]+]]:vgpr(s32) = G_AND [[UV4]], [[UV6]]
360 ; CHECK: [[AND3:%[0-9]+]]:vgpr(s32) = G_AND [[UV5]], [[UV7]]
361 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND2]](s32), [[AND3]](s32)
362 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
363 %0:_(s64) = COPY $sgpr0_sgpr1
364 %1:_(s64) = COPY $sgpr2_sgpr3
365 %2:_(s64) = COPY $vgpr0_vgpr1
366 %3:_(s64) = G_AND %0, %2
367 %4:_(s64) = G_AND %1, %3
377 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
378 ; CHECK-LABEL: name: and_v2i32_ss
379 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
380 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr2_sgpr3
381 ; CHECK: [[AND:%[0-9]+]]:sgpr(<2 x s32>) = G_AND [[COPY]], [[COPY1]]
382 ; CHECK: S_NOP 0, implicit [[AND]](<2 x s32>)
383 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
384 %1:_(<2 x s32>) = COPY $sgpr2_sgpr3
385 %2:_(<2 x s32>) = G_AND %0, %1
395 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
396 ; CHECK-LABEL: name: and_v2i32_sv
397 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
398 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
399 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
400 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
401 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
402 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
403 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
404 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
405 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
406 %1:_(<2 x s32>) = COPY $vgpr0_vgpr1
407 %2:_(<2 x s32>) = G_AND %0, %1
417 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
419 ; CHECK-LABEL: name: and_v2i32_vs
420 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
421 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
422 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
423 ; CHECK: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
424 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
425 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
426 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
427 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
428 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
429 %1:_(<2 x s32>) = COPY $sgpr0_sgpr1
430 %2:_(<2 x s32>) = G_AND %0, %1
440 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
441 ; CHECK-LABEL: name: and_v2i32_vv
442 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
443 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr2_vgpr3
444 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
445 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
446 ; CHECK: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
447 ; CHECK: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
448 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
449 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
450 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
451 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
452 %2:_(<2 x s32>) = G_AND %0, %1
462 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
463 ; CHECK-LABEL: name: and_v4s16_ss
464 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
465 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr2_sgpr3
466 ; CHECK: [[AND:%[0-9]+]]:sgpr(<4 x s16>) = G_AND [[COPY]], [[COPY1]]
467 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
468 %1:_(<4 x s16>) = COPY $sgpr2_sgpr3
469 %2:_(<4 x s16>) = G_AND %0, %1
478 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
479 ; CHECK-LABEL: name: and_v4s16_sv
480 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
481 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
482 ; CHECK: [[UV:%[0-9]+]]:sgpr(<2 x s16>), [[UV1:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
483 ; CHECK: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
484 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
485 ; CHECK: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
486 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
487 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
488 %1:_(<4 x s16>) = COPY $vgpr0_vgpr1
489 %2:_(<4 x s16>) = G_AND %0, %1
498 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
499 ; CHECK-LABEL: name: and_v4s16_vs
500 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
501 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
502 ; CHECK: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
503 ; CHECK: [[UV2:%[0-9]+]]:sgpr(<2 x s16>), [[UV3:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
504 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
505 ; CHECK: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
506 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
507 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
508 %1:_(<4 x s16>) = COPY $sgpr0_sgpr1
509 %2:_(<4 x s16>) = G_AND %0, %1
518 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
519 ; CHECK-LABEL: name: and_v4s16_vv
520 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
521 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr2_vgpr3
522 ; CHECK: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
523 ; CHECK: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
524 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
525 ; CHECK: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
526 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
527 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
528 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
529 %2:_(<4 x s16>) = G_AND %0, %1
538 liveins: $sgpr0, $sgpr1
539 ; CHECK-LABEL: name: and_v2s16_ss
540 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
541 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
542 ; CHECK: [[AND:%[0-9]+]]:sgpr(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
543 %0:_(<2 x s16>) = COPY $sgpr0
544 %1:_(<2 x s16>) = COPY $sgpr1
545 %2:_(<2 x s16>) = G_AND %0, %1
554 liveins: $sgpr0, $vgpr0
555 ; CHECK-LABEL: name: and_v2s16_sv
556 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
557 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
558 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
559 %0:_(<2 x s16>) = COPY $sgpr0
560 %1:_(<2 x s16>) = COPY $vgpr0
561 %2:_(<2 x s16>) = G_AND %0, %1
570 liveins: $sgpr0, $vgpr0
571 ; CHECK-LABEL: name: and_v2s16_vs
572 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
573 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
574 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
575 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY]], [[COPY2]]
576 %0:_(<2 x s16>) = COPY $vgpr0
577 %1:_(<2 x s16>) = COPY $sgpr0
578 %2:_(<2 x s16>) = G_AND %0, %1
587 liveins: $vgpr0, $vgpr1
588 ; CHECK-LABEL: name: and_v2s16_vv
589 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
590 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
591 ; CHECK: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
592 %0:_(<2 x s16>) = COPY $vgpr0
593 %1:_(<2 x s16>) = COPY $vgpr1
594 %2:_(<2 x s16>) = G_AND %0, %1