1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=amdgpu-regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck %s
11 liveins: $sgpr0, $sgpr1
12 ; CHECK-LABEL: name: and_s32_ss
13 ; CHECK: liveins: $sgpr0, $sgpr1
15 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
16 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
17 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(s32) = G_AND [[COPY]], [[COPY1]]
18 %0:_(s32) = COPY $sgpr0
19 %1:_(s32) = COPY $sgpr1
20 %2:_(s32) = G_AND %0, %1
29 liveins: $sgpr0, $vgpr0
30 ; CHECK-LABEL: name: and_s32_sv
31 ; CHECK: liveins: $sgpr0, $vgpr0
33 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
34 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
35 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
36 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY2]], [[COPY1]]
37 %0:_(s32) = COPY $sgpr0
38 %1:_(s32) = COPY $vgpr0
39 %2:_(s32) = G_AND %0, %1
48 liveins: $sgpr0, $vgpr0
49 ; CHECK-LABEL: name: and_s32_vs
50 ; CHECK: liveins: $sgpr0, $vgpr0
52 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
53 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
54 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
55 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY2]]
56 %0:_(s32) = COPY $vgpr0
57 %1:_(s32) = COPY $sgpr0
58 %2:_(s32) = G_AND %0, %1
67 liveins: $vgpr0, $vgpr1
68 ; CHECK-LABEL: name: and_s32_vv
69 ; CHECK: liveins: $vgpr0, $vgpr1
71 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
72 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
73 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[COPY]], [[COPY1]]
74 %0:_(s32) = COPY $vgpr0
75 %1:_(s32) = COPY $vgpr1
76 %2:_(s32) = G_AND %0, %1
85 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
86 ; CHECK-LABEL: name: and_s64_ss
87 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
89 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
90 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
91 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(s64) = G_AND [[COPY]], [[COPY1]]
92 %0:_(s64) = COPY $sgpr0_sgpr1
93 %1:_(s64) = COPY $sgpr2_sgpr3
94 %2:_(s64) = G_AND %0, %1
103 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
104 ; CHECK-LABEL: name: and_s64_sv
105 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
107 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
108 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
109 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
110 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
111 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
112 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
113 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
114 %0:_(s64) = COPY $sgpr0_sgpr1
115 %1:_(s64) = COPY $vgpr0_vgpr1
116 %2:_(s64) = G_AND %0, %1
125 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
126 ; CHECK-LABEL: name: and_s64_vs
127 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
129 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
130 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
131 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
132 ; CHECK-NEXT: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
133 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
134 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
135 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
136 %0:_(s64) = COPY $vgpr0_vgpr1
137 %1:_(s64) = COPY $sgpr0_sgpr1
138 %2:_(s64) = G_AND %0, %1
147 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
148 ; CHECK-LABEL: name: and_s64_vv
149 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
151 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
152 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
153 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
154 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
155 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
156 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
157 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
158 %0:_(s64) = COPY $vgpr0_vgpr1
159 %1:_(s64) = COPY $vgpr2_vgpr3
160 %2:_(s64) = G_AND %0, %1
164 name: and_s64_vv_user
169 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
170 ; CHECK-LABEL: name: and_s64_vv_user
171 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
173 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
174 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
175 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
176 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
177 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
178 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
179 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
180 ; CHECK-NEXT: S_NOP 0, implicit [[MV]](s64)
181 %0:_(s64) = COPY $vgpr0_vgpr1
182 %1:_(s64) = COPY $vgpr2_vgpr3
183 %2:_(s64) = G_AND %0, %1
187 name: and_s64_ss_ss_merge
192 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
193 ; CHECK-LABEL: name: and_s64_ss_ss_merge
194 ; CHECK: liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
196 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
197 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
198 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
199 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
200 ; CHECK-NEXT: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
201 ; CHECK-NEXT: [[MV1:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
202 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(s64) = G_AND [[MV]], [[MV1]]
203 ; CHECK-NEXT: S_NOP 0, implicit [[AND]](s64)
204 %0:_(s32) = COPY $sgpr0
205 %1:_(s32) = COPY $sgpr1
206 %2:_(s32) = COPY $sgpr2
207 %3:_(s32) = COPY $sgpr3
208 %4:_(s64) = G_MERGE_VALUES %0, %1
209 %5:_(s64) = G_MERGE_VALUES %2, %3
210 %6:_(s64) = G_AND %4, %5
215 name: and_s64_vv_vv_merge
220 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
221 ; CHECK-LABEL: name: and_s64_vv_vv_merge
222 ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
224 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
225 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
226 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
227 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr3
228 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
229 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
230 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
231 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
232 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
233 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
234 ; CHECK-NEXT: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
235 ; CHECK-NEXT: S_NOP 0, implicit [[MV2]](s64)
236 %0:_(s32) = COPY $vgpr0
237 %1:_(s32) = COPY $vgpr1
238 %2:_(s32) = COPY $vgpr2
239 %3:_(s32) = COPY $vgpr3
240 %4:_(s64) = G_MERGE_VALUES %0, %1
241 %5:_(s64) = G_MERGE_VALUES %2, %3
242 %6:_(s64) = G_AND %4, %5
247 name: and_s64_s_sv_merge
252 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
253 ; CHECK-LABEL: name: and_s64_s_sv_merge
254 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
256 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
257 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
258 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
259 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
260 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY2]](s32)
261 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
262 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
263 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
264 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
265 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
266 ; CHECK-NEXT: S_NOP 0, implicit [[MV1]](s64)
267 %0:_(s64) = COPY $sgpr0_sgpr1
268 %1:_(s32) = COPY $sgpr2
269 %2:_(s32) = COPY $vgpr0
270 %3:_(s64) = G_MERGE_VALUES %1, %2
271 %4:_(s64) = G_AND %0, %3
276 name: and_s64_s_vs_merge
281 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
282 ; CHECK-LABEL: name: and_s64_s_vs_merge
283 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
285 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
286 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
287 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
288 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
289 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
290 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
291 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
292 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
293 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
294 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
295 ; CHECK-NEXT: S_NOP 0, implicit [[MV1]](s64)
296 %0:_(s64) = COPY $sgpr0_sgpr1
297 %1:_(s32) = COPY $sgpr2
298 %2:_(s32) = COPY $vgpr0
299 %3:_(s64) = G_MERGE_VALUES %2, %1
300 %4:_(s64) = G_AND %0, %3
305 name: and_s64_sv_sv_merge
310 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
311 ; CHECK-LABEL: name: and_s64_sv_sv_merge
312 ; CHECK: liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
314 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
315 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
316 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
317 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
318 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
319 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
320 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
321 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY5]](s32), [[COPY3]](s32)
322 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
323 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
324 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
325 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
326 ; CHECK-NEXT: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
327 ; CHECK-NEXT: S_NOP 0, implicit [[MV2]](s64)
328 %0:_(s32) = COPY $sgpr0
329 %1:_(s32) = COPY $sgpr1
330 %2:_(s32) = COPY $vgpr0
331 %3:_(s32) = COPY $vgpr1
332 %4:_(s64) = G_MERGE_VALUES %0, %2
333 %5:_(s64) = G_MERGE_VALUES %1, %3
334 %6:_(s64) = G_AND %4, %5
339 name: and_s64_sv_vs_merge
344 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
345 ; CHECK-LABEL: name: and_s64_sv_vs_merge
346 ; CHECK: liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
348 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
349 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
350 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
351 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
352 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
353 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
354 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
355 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY5]](s32)
356 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
357 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
358 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
359 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
360 ; CHECK-NEXT: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
361 ; CHECK-NEXT: S_NOP 0, implicit [[MV2]](s64)
362 %0:_(s32) = COPY $sgpr0
363 %1:_(s32) = COPY $sgpr1
364 %2:_(s32) = COPY $vgpr0
365 %3:_(s32) = COPY $vgpr1
366 %4:_(s64) = G_MERGE_VALUES %0, %2
367 %5:_(s64) = G_MERGE_VALUES %3, %1
368 %6:_(s64) = G_AND %4, %5
373 name: and_chain_s64_sv
378 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $vgpr0_vgpr1
379 ; CHECK-LABEL: name: and_chain_s64_sv
380 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $vgpr0_vgpr1
382 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
383 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
384 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
385 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
386 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY2]](s64)
387 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
388 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
389 ; CHECK-NEXT: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND]](s32), [[AND1]](s32)
390 ; CHECK-NEXT: [[UV4:%[0-9]+]]:sgpr(s32), [[UV5:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
391 ; CHECK-NEXT: [[UV6:%[0-9]+]]:vgpr(s32), [[UV7:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
392 ; CHECK-NEXT: [[AND2:%[0-9]+]]:vgpr(s32) = G_AND [[UV4]], [[UV6]]
393 ; CHECK-NEXT: [[AND3:%[0-9]+]]:vgpr(s32) = G_AND [[UV5]], [[UV7]]
394 ; CHECK-NEXT: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[AND2]](s32), [[AND3]](s32)
395 ; CHECK-NEXT: S_NOP 0, implicit [[MV1]](s64)
396 %0:_(s64) = COPY $sgpr0_sgpr1
397 %1:_(s64) = COPY $sgpr2_sgpr3
398 %2:_(s64) = COPY $vgpr0_vgpr1
399 %3:_(s64) = G_AND %0, %2
400 %4:_(s64) = G_AND %1, %3
410 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
411 ; CHECK-LABEL: name: and_v2i32_ss
412 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
414 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
415 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr2_sgpr3
416 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(<2 x s32>) = G_AND [[COPY]], [[COPY1]]
417 ; CHECK-NEXT: S_NOP 0, implicit [[AND]](<2 x s32>)
418 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
419 %1:_(<2 x s32>) = COPY $sgpr2_sgpr3
420 %2:_(<2 x s32>) = G_AND %0, %1
430 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
431 ; CHECK-LABEL: name: and_v2i32_sv
432 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
434 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
435 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
436 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
437 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
438 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
439 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
440 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
441 ; CHECK-NEXT: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
442 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
443 %1:_(<2 x s32>) = COPY $vgpr0_vgpr1
444 %2:_(<2 x s32>) = G_AND %0, %1
454 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
456 ; CHECK-LABEL: name: and_v2i32_vs
457 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
459 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
460 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
461 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
462 ; CHECK-NEXT: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
463 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
464 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
465 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
466 ; CHECK-NEXT: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
467 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
468 %1:_(<2 x s32>) = COPY $sgpr0_sgpr1
469 %2:_(<2 x s32>) = G_AND %0, %1
479 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
480 ; CHECK-LABEL: name: and_v2i32_vv
481 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
483 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
484 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr2_vgpr3
485 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
486 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
487 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(s32) = G_AND [[UV]], [[UV2]]
488 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(s32) = G_AND [[UV1]], [[UV3]]
489 ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[AND]](s32), [[AND1]](s32)
490 ; CHECK-NEXT: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
491 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
492 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
493 %2:_(<2 x s32>) = G_AND %0, %1
503 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
504 ; CHECK-LABEL: name: and_v4s16_ss
505 ; CHECK: liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
507 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
508 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr2_sgpr3
509 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(<4 x s16>) = G_AND [[COPY]], [[COPY1]]
510 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
511 %1:_(<4 x s16>) = COPY $sgpr2_sgpr3
512 %2:_(<4 x s16>) = G_AND %0, %1
521 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
522 ; CHECK-LABEL: name: and_v4s16_sv
523 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
525 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
526 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
527 ; CHECK-NEXT: [[UV:%[0-9]+]]:sgpr(<2 x s16>), [[UV1:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
528 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
529 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
530 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
531 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
532 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
533 %1:_(<4 x s16>) = COPY $vgpr0_vgpr1
534 %2:_(<4 x s16>) = G_AND %0, %1
543 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
544 ; CHECK-LABEL: name: and_v4s16_vs
545 ; CHECK: liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
547 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
548 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
549 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
550 ; CHECK-NEXT: [[UV2:%[0-9]+]]:sgpr(<2 x s16>), [[UV3:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
551 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
552 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
553 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
554 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
555 %1:_(<4 x s16>) = COPY $sgpr0_sgpr1
556 %2:_(<4 x s16>) = G_AND %0, %1
565 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
566 ; CHECK-LABEL: name: and_v4s16_vv
567 ; CHECK: liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
569 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
570 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr2_vgpr3
571 ; CHECK-NEXT: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
572 ; CHECK-NEXT: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
573 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV]], [[UV2]]
574 ; CHECK-NEXT: [[AND1:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[UV1]], [[UV3]]
575 ; CHECK-NEXT: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[AND]](<2 x s16>), [[AND1]](<2 x s16>)
576 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
577 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
578 %2:_(<4 x s16>) = G_AND %0, %1
587 liveins: $sgpr0, $sgpr1
588 ; CHECK-LABEL: name: and_v2s16_ss
589 ; CHECK: liveins: $sgpr0, $sgpr1
591 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
592 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
593 ; CHECK-NEXT: [[AND:%[0-9]+]]:sgpr(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
594 %0:_(<2 x s16>) = COPY $sgpr0
595 %1:_(<2 x s16>) = COPY $sgpr1
596 %2:_(<2 x s16>) = G_AND %0, %1
605 liveins: $sgpr0, $vgpr0
606 ; CHECK-LABEL: name: and_v2s16_sv
607 ; CHECK: liveins: $sgpr0, $vgpr0
609 ; CHECK-NEXT: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
610 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
611 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY]](<2 x s16>)
612 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY2]], [[COPY1]]
613 %0:_(<2 x s16>) = COPY $sgpr0
614 %1:_(<2 x s16>) = COPY $vgpr0
615 %2:_(<2 x s16>) = G_AND %0, %1
624 liveins: $sgpr0, $vgpr0
625 ; CHECK-LABEL: name: and_v2s16_vs
626 ; CHECK: liveins: $sgpr0, $vgpr0
628 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
629 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
630 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
631 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY]], [[COPY2]]
632 %0:_(<2 x s16>) = COPY $vgpr0
633 %1:_(<2 x s16>) = COPY $sgpr0
634 %2:_(<2 x s16>) = G_AND %0, %1
643 liveins: $vgpr0, $vgpr1
644 ; CHECK-LABEL: name: and_v2s16_vv
645 ; CHECK: liveins: $vgpr0, $vgpr1
647 ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
648 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
649 ; CHECK-NEXT: [[AND:%[0-9]+]]:vgpr(<2 x s16>) = G_AND [[COPY]], [[COPY1]]
650 %0:_(<2 x s16>) = COPY $vgpr0
651 %1:_(<2 x s16>) = COPY $vgpr1
652 %2:_(<2 x s16>) = G_AND %0, %1