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: or_s32_ss
13 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; CHECK: [[OR:%[0-9]+]]:sgpr(s32) = G_OR [[COPY]], [[COPY1]]
16 %0:_(s32) = COPY $sgpr0
17 %1:_(s32) = COPY $sgpr1
18 %2:_(s32) = G_OR %0, %1
27 liveins: $sgpr0, $vgpr0
28 ; CHECK-LABEL: name: or_s32_sv
29 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
30 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
31 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[COPY]], [[COPY1]]
32 %0:_(s32) = COPY $sgpr0
33 %1:_(s32) = COPY $vgpr0
34 %2:_(s32) = G_OR %0, %1
43 liveins: $sgpr0, $vgpr0
44 ; CHECK-LABEL: name: or_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: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[COPY]], [[COPY2]]
49 %0:_(s32) = COPY $vgpr0
50 %1:_(s32) = COPY $sgpr0
51 %2:_(s32) = G_OR %0, %1
60 liveins: $vgpr0, $vgpr1
61 ; CHECK-LABEL: name: or_s32_vv
62 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
63 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
64 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[COPY]], [[COPY1]]
65 %0:_(s32) = COPY $vgpr0
66 %1:_(s32) = COPY $vgpr1
67 %2:_(s32) = G_OR %0, %1
76 liveins: $sgpr0, $sgpr1
77 ; CHECK-LABEL: name: or_i1_scc_scc
78 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
79 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
80 ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
81 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
82 ; CHECK: [[ICMP1:%[0-9]+]]:scc(s1) = G_ICMP intpred(ne), [[COPY1]](s32), [[C]]
83 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s1) = COPY [[ICMP]](s1)
84 ; CHECK: [[COPY3:%[0-9]+]]:sgpr(s1) = COPY [[ICMP1]](s1)
85 ; CHECK: [[OR:%[0-9]+]]:scc(s1) = G_OR [[COPY2]], [[COPY3]]
86 ; CHECK: S_NOP 0, implicit [[OR]](s1)
87 %0:_(s32) = COPY $sgpr0
88 %1:_(s32) = COPY $sgpr1
89 %2:_(s32) = G_CONSTANT i32 0
90 %4:_(s1) = G_ICMP intpred(ne), %0, %2
91 %5:_(s1) = G_ICMP intpred(ne), %1, %2
92 %6:_(s1) = G_OR %4, %5
102 liveins: $vgpr0, $vgpr1
103 ; CHECK-LABEL: name: or_i1_vcc_vcc
104 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
105 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
106 ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
107 ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
108 ; CHECK: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s32), [[C]]
109 ; CHECK: [[OR:%[0-9]+]]:vcc(s1) = G_OR [[ICMP]], [[ICMP1]]
110 ; CHECK: S_NOP 0, implicit [[OR]](s1)
111 %0:_(s32) = COPY $vgpr0
112 %1:_(s32) = COPY $vgpr1
113 %2:_(s32) = G_CONSTANT i32 0
114 %4:_(s1) = G_ICMP intpred(ne), %0, %2
115 %5:_(s1) = G_ICMP intpred(ne), %1, %2
116 %6:_(s1) = G_OR %4, %5
126 liveins: $sgpr0, $vgpr0
127 ; CHECK-LABEL: name: or_i1_scc_vcc
128 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
129 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
130 ; CHECK: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
131 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[C]]
132 ; CHECK: [[ICMP1:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY1]](s32), [[C]]
133 ; CHECK: [[COPY2:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
134 ; CHECK: [[OR:%[0-9]+]]:vcc(s1) = G_OR [[COPY2]], [[ICMP1]]
135 ; CHECK: S_NOP 0, implicit [[OR]](s1)
136 %0:_(s32) = COPY $sgpr0
137 %1:_(s32) = COPY $vgpr0
138 %2:_(s32) = G_CONSTANT i32 0
139 %4:_(s1) = G_ICMP intpred(ne), %0, %2
140 %5:_(s1) = G_ICMP intpred(ne), %1, %2
141 %6:_(s1) = G_OR %4, %5
146 name: or_i1_sgpr_trunc_sgpr_trunc
150 liveins: $sgpr0, $sgpr1
151 ; CHECK-LABEL: name: or_i1_sgpr_trunc_sgpr_trunc
152 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
153 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
154 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
155 ; CHECK: [[TRUNC1:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY1]](s32)
156 ; CHECK: [[OR:%[0-9]+]]:sgpr(s1) = G_OR [[TRUNC]], [[TRUNC1]]
157 ; CHECK: S_NOP 0, implicit [[OR]](s1)
158 %0:_(s32) = COPY $sgpr0
159 %1:_(s32) = COPY $sgpr1
160 %2:_(s1) = G_TRUNC %0
161 %3:_(s1) = G_TRUNC %1
162 %4:_(s1) = G_OR %2, %3
168 name: or_i1_trunc_scc
172 liveins: $sgpr0, $sgpr1
173 ; CHECK-LABEL: name: or_i1_trunc_scc
174 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
175 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
176 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
177 ; CHECK: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
178 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s1) = COPY [[ICMP]](s1)
179 ; CHECK: [[OR:%[0-9]+]]:scc(s1) = G_OR [[TRUNC]], [[COPY2]]
180 ; CHECK: S_NOP 0, implicit [[OR]](s1)
181 %0:_(s32) = COPY $sgpr0
182 %1:_(s32) = COPY $sgpr1
183 %2:_(s1) = G_TRUNC %0
184 %3:_(s1) = G_ICMP intpred(ne), %0, %1
185 %4:_(s1) = G_OR %2, %3
190 name: or_i1_s_trunc_vcc
194 liveins: $sgpr0, $vgpr0
195 ; CHECK-LABEL: name: or_i1_s_trunc_vcc
196 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
197 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
198 ; CHECK: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY]](s32)
199 ; CHECK: [[ICMP:%[0-9]+]]:vcc(s1) = G_ICMP intpred(ne), [[COPY]](s32), [[COPY1]]
200 ; CHECK: [[COPY2:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
201 ; CHECK: [[OR:%[0-9]+]]:vcc(s1) = G_OR [[COPY2]], [[ICMP]]
202 ; CHECK: S_NOP 0, implicit [[OR]](s1)
203 %0:_(s32) = COPY $sgpr0
204 %1:_(s32) = COPY $vgpr0
205 %2:_(s1) = G_TRUNC %0
206 %3:_(s1) = G_ICMP intpred(ne), %0, %1
207 %4:_(s1) = G_OR %2, %3
217 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
218 ; CHECK-LABEL: name: or_s64_ss
219 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
220 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
221 ; CHECK: [[OR:%[0-9]+]]:sgpr(s64) = G_OR [[COPY]], [[COPY1]]
222 %0:_(s64) = COPY $sgpr0_sgpr1
223 %1:_(s64) = COPY $sgpr2_sgpr3
224 %2:_(s64) = G_OR %0, %1
233 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
234 ; CHECK-LABEL: name: or_s64_sv
235 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
236 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
237 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
238 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
239 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
240 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
241 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
242 %0:_(s64) = COPY $sgpr0_sgpr1
243 %1:_(s64) = COPY $vgpr0_vgpr1
244 %2:_(s64) = G_OR %0, %1
253 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
254 ; CHECK-LABEL: name: or_s64_vs
255 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
256 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
257 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
258 ; CHECK: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
259 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
260 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
261 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
262 %0:_(s64) = COPY $vgpr0_vgpr1
263 %1:_(s64) = COPY $sgpr0_sgpr1
264 %2:_(s64) = G_OR %0, %1
273 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
274 ; CHECK-LABEL: name: or_s64_vv
275 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
276 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
277 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
278 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
279 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
280 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
281 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
282 %0:_(s64) = COPY $vgpr0_vgpr1
283 %1:_(s64) = COPY $vgpr2_vgpr3
284 %2:_(s64) = G_OR %0, %1
293 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
294 ; CHECK-LABEL: name: or_s64_vv_user
295 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
296 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s64) = COPY $vgpr2_vgpr3
297 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
298 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
299 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
300 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
301 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
302 ; CHECK: S_NOP 0, implicit [[MV]](s64)
303 %0:_(s64) = COPY $vgpr0_vgpr1
304 %1:_(s64) = COPY $vgpr2_vgpr3
305 %2:_(s64) = G_OR %0, %1
309 name: or_s64_ss_ss_merge
314 liveins: $sgpr0, $sgpr1, $sgpr2, $sgpr3
315 ; CHECK-LABEL: name: or_s64_ss_ss_merge
316 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
317 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
318 ; CHECK: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
319 ; CHECK: [[COPY3:%[0-9]+]]:sgpr(s32) = COPY $sgpr3
320 ; CHECK: [[MV:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
321 ; CHECK: [[MV1:%[0-9]+]]:sgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
322 ; CHECK: [[OR:%[0-9]+]]:sgpr(s64) = G_OR [[MV]], [[MV1]]
323 ; CHECK: S_NOP 0, implicit [[OR]](s64)
324 %0:_(s32) = COPY $sgpr0
325 %1:_(s32) = COPY $sgpr1
326 %2:_(s32) = COPY $sgpr2
327 %3:_(s32) = COPY $sgpr3
328 %4:_(s64) = G_MERGE_VALUES %0, %1
329 %5:_(s64) = G_MERGE_VALUES %2, %3
330 %6:_(s64) = G_OR %4, %5
335 name: or_s64_vv_vv_merge
340 liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
341 ; CHECK-LABEL: name: or_s64_vv_vv_merge
342 ; CHECK: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
343 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
344 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr2
345 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr3
346 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)
347 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
348 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
349 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
350 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
351 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
352 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
353 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
354 %0:_(s32) = COPY $vgpr0
355 %1:_(s32) = COPY $vgpr1
356 %2:_(s32) = COPY $vgpr2
357 %3:_(s32) = COPY $vgpr3
358 %4:_(s64) = G_MERGE_VALUES %0, %1
359 %5:_(s64) = G_MERGE_VALUES %2, %3
360 %6:_(s64) = G_OR %4, %5
365 name: or_s64_s_sv_merge
370 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
371 ; CHECK-LABEL: name: or_s64_s_sv_merge
372 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
373 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
374 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
375 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
376 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY2]](s32)
377 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
378 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
379 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
380 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
381 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
382 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
383 %0:_(s64) = COPY $sgpr0_sgpr1
384 %1:_(s32) = COPY $sgpr2
385 %2:_(s32) = COPY $vgpr0
386 %3:_(s64) = G_MERGE_VALUES %1, %2
387 %4:_(s64) = G_OR %0, %3
392 name: or_s64_s_vs_merge
397 liveins: $sgpr0_sgpr1, $sgpr2, $vgpr0
398 ; CHECK-LABEL: name: or_s64_s_vs_merge
399 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
400 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
401 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
402 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
403 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY2]](s32), [[COPY3]](s32)
404 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
405 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
406 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
407 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
408 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
409 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
410 %0:_(s64) = COPY $sgpr0_sgpr1
411 %1:_(s32) = COPY $sgpr2
412 %2:_(s32) = COPY $vgpr0
413 %3:_(s64) = G_MERGE_VALUES %2, %1
414 %4:_(s64) = G_OR %0, %3
419 name: or_s64_sv_sv_merge
424 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
425 ; CHECK-LABEL: name: or_s64_sv_sv_merge
426 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
427 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
428 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
429 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
430 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
431 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
432 ; CHECK: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
433 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY5]](s32), [[COPY3]](s32)
434 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
435 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
436 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
437 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
438 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
439 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
440 %0:_(s32) = COPY $sgpr0
441 %1:_(s32) = COPY $sgpr1
442 %2:_(s32) = COPY $vgpr0
443 %3:_(s32) = COPY $vgpr1
444 %4:_(s64) = G_MERGE_VALUES %0, %2
445 %5:_(s64) = G_MERGE_VALUES %1, %3
446 %6:_(s64) = G_OR %4, %5
451 name: or_s64_sv_vs_merge
456 liveins: $sgpr0, $sgpr1, $vgpr0, $vgpr1
457 ; CHECK-LABEL: name: or_s64_sv_vs_merge
458 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
459 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
460 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
461 ; CHECK: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
462 ; CHECK: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
463 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY4]](s32), [[COPY2]](s32)
464 ; CHECK: [[COPY5:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
465 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[COPY3]](s32), [[COPY5]](s32)
466 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
467 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV1]](s64)
468 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
469 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
470 ; CHECK: [[MV2:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
471 ; CHECK: S_NOP 0, implicit [[MV2]](s64)
472 %0:_(s32) = COPY $sgpr0
473 %1:_(s32) = COPY $sgpr1
474 %2:_(s32) = COPY $vgpr0
475 %3:_(s32) = COPY $vgpr1
476 %4:_(s64) = G_MERGE_VALUES %0, %2
477 %5:_(s64) = G_MERGE_VALUES %3, %1
478 %6:_(s64) = G_OR %4, %5
483 name: or_chain_s64_sv
488 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3, $vgpr0_vgpr1
489 ; CHECK-LABEL: name: or_chain_s64_sv
490 ; CHECK: [[COPY:%[0-9]+]]:sgpr(s64) = COPY $sgpr0_sgpr1
491 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(s64) = COPY $sgpr2_sgpr3
492 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(s64) = COPY $vgpr0_vgpr1
493 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](s64)
494 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY2]](s64)
495 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
496 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
497 ; CHECK: [[MV:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR]](s32), [[OR1]](s32)
498 ; CHECK: [[UV4:%[0-9]+]]:sgpr(s32), [[UV5:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](s64)
499 ; CHECK: [[UV6:%[0-9]+]]:vgpr(s32), [[UV7:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[MV]](s64)
500 ; CHECK: [[OR2:%[0-9]+]]:vgpr(s32) = G_OR [[UV4]], [[UV6]]
501 ; CHECK: [[OR3:%[0-9]+]]:vgpr(s32) = G_OR [[UV5]], [[UV7]]
502 ; CHECK: [[MV1:%[0-9]+]]:vgpr(s64) = G_MERGE_VALUES [[OR2]](s32), [[OR3]](s32)
503 ; CHECK: S_NOP 0, implicit [[MV1]](s64)
504 %0:_(s64) = COPY $sgpr0_sgpr1
505 %1:_(s64) = COPY $sgpr2_sgpr3
506 %2:_(s64) = COPY $vgpr0_vgpr1
507 %3:_(s64) = G_OR %0, %2
508 %4:_(s64) = G_OR %1, %3
518 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
519 ; CHECK-LABEL: name: or_v2i32_ss
520 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
521 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr2_sgpr3
522 ; CHECK: [[OR:%[0-9]+]]:sgpr(<2 x s32>) = G_OR [[COPY]], [[COPY1]]
523 ; CHECK: S_NOP 0, implicit [[OR]](<2 x s32>)
524 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
525 %1:_(<2 x s32>) = COPY $sgpr2_sgpr3
526 %2:_(<2 x s32>) = G_OR %0, %1
536 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
537 ; CHECK-LABEL: name: or_v2i32_sv
538 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
539 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
540 ; CHECK: [[UV:%[0-9]+]]:sgpr(s32), [[UV1:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
541 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
542 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
543 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
544 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[OR]](s32), [[OR1]](s32)
545 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
546 %0:_(<2 x s32>) = COPY $sgpr0_sgpr1
547 %1:_(<2 x s32>) = COPY $vgpr0_vgpr1
548 %2:_(<2 x s32>) = G_OR %0, %1
558 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
560 ; CHECK-LABEL: name: or_v2i32_vs
561 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
562 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s32>) = COPY $sgpr0_sgpr1
563 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
564 ; CHECK: [[UV2:%[0-9]+]]:sgpr(s32), [[UV3:%[0-9]+]]:sgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
565 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
566 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
567 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[OR]](s32), [[OR1]](s32)
568 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
569 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
570 %1:_(<2 x s32>) = COPY $sgpr0_sgpr1
571 %2:_(<2 x s32>) = G_OR %0, %1
581 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
582 ; CHECK-LABEL: name: or_v2i32_vv
583 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr0_vgpr1
584 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s32>) = COPY $vgpr2_vgpr3
585 ; CHECK: [[UV:%[0-9]+]]:vgpr(s32), [[UV1:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
586 ; CHECK: [[UV2:%[0-9]+]]:vgpr(s32), [[UV3:%[0-9]+]]:vgpr(s32) = G_UNMERGE_VALUES [[COPY1]](<2 x s32>)
587 ; CHECK: [[OR:%[0-9]+]]:vgpr(s32) = G_OR [[UV]], [[UV2]]
588 ; CHECK: [[OR1:%[0-9]+]]:vgpr(s32) = G_OR [[UV1]], [[UV3]]
589 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:vgpr(<2 x s32>) = G_BUILD_VECTOR [[OR]](s32), [[OR1]](s32)
590 ; CHECK: S_NOP 0, implicit [[BUILD_VECTOR]](<2 x s32>)
591 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
592 %1:_(<2 x s32>) = COPY $vgpr2_vgpr3
593 %2:_(<2 x s32>) = G_OR %0, %1
603 liveins: $sgpr0_sgpr1, $sgpr2_sgpr3
604 ; CHECK-LABEL: name: or_v4s16_ss
605 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
606 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr2_sgpr3
607 ; CHECK: [[OR:%[0-9]+]]:sgpr(<4 x s16>) = G_OR [[COPY]], [[COPY1]]
608 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
609 %1:_(<4 x s16>) = COPY $sgpr2_sgpr3
610 %2:_(<4 x s16>) = G_OR %0, %1
619 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
620 ; CHECK-LABEL: name: or_v4s16_sv
621 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
622 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
623 ; CHECK: [[UV:%[0-9]+]]:sgpr(<2 x s16>), [[UV1:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
624 ; CHECK: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
625 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV]], [[UV2]]
626 ; CHECK: [[OR1:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV1]], [[UV3]]
627 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[OR]](<2 x s16>), [[OR1]](<2 x s16>)
628 %0:_(<4 x s16>) = COPY $sgpr0_sgpr1
629 %1:_(<4 x s16>) = COPY $vgpr0_vgpr1
630 %2:_(<4 x s16>) = G_OR %0, %1
639 liveins: $sgpr0_sgpr1, $vgpr0_vgpr1
640 ; CHECK-LABEL: name: or_v4s16_vs
641 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
642 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<4 x s16>) = COPY $sgpr0_sgpr1
643 ; CHECK: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
644 ; CHECK: [[UV2:%[0-9]+]]:sgpr(<2 x s16>), [[UV3:%[0-9]+]]:sgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
645 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV]], [[UV2]]
646 ; CHECK: [[OR1:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV1]], [[UV3]]
647 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[OR]](<2 x s16>), [[OR1]](<2 x s16>)
648 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
649 %1:_(<4 x s16>) = COPY $sgpr0_sgpr1
650 %2:_(<4 x s16>) = G_OR %0, %1
659 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3
660 ; CHECK-LABEL: name: or_v4s16_vv
661 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr0_vgpr1
662 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<4 x s16>) = COPY $vgpr2_vgpr3
663 ; CHECK: [[UV:%[0-9]+]]:vgpr(<2 x s16>), [[UV1:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
664 ; CHECK: [[UV2:%[0-9]+]]:vgpr(<2 x s16>), [[UV3:%[0-9]+]]:vgpr(<2 x s16>) = G_UNMERGE_VALUES [[COPY1]](<4 x s16>)
665 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV]], [[UV2]]
666 ; CHECK: [[OR1:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[UV1]], [[UV3]]
667 ; CHECK: [[CONCAT_VECTORS:%[0-9]+]]:vgpr(<4 x s16>) = G_CONCAT_VECTORS [[OR]](<2 x s16>), [[OR1]](<2 x s16>)
668 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
669 %1:_(<4 x s16>) = COPY $vgpr2_vgpr3
670 %2:_(<4 x s16>) = G_OR %0, %1
679 liveins: $sgpr0, $sgpr1
680 ; CHECK-LABEL: name: or_v2s16_ss
681 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
682 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr1
683 ; CHECK: [[OR:%[0-9]+]]:sgpr(<2 x s16>) = G_OR [[COPY]], [[COPY1]]
684 %0:_(<2 x s16>) = COPY $sgpr0
685 %1:_(<2 x s16>) = COPY $sgpr1
686 %2:_(<2 x s16>) = G_OR %0, %1
695 liveins: $sgpr0, $vgpr0
696 ; CHECK-LABEL: name: or_v2s16_sv
697 ; CHECK: [[COPY:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
698 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
699 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[COPY]], [[COPY1]]
700 %0:_(<2 x s16>) = COPY $sgpr0
701 %1:_(<2 x s16>) = COPY $vgpr0
702 %2:_(<2 x s16>) = G_OR %0, %1
711 liveins: $sgpr0, $vgpr0
712 ; CHECK-LABEL: name: or_v2s16_vs
713 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
714 ; CHECK: [[COPY1:%[0-9]+]]:sgpr(<2 x s16>) = COPY $sgpr0
715 ; CHECK: [[COPY2:%[0-9]+]]:vgpr(<2 x s16>) = COPY [[COPY1]](<2 x s16>)
716 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[COPY]], [[COPY2]]
717 %0:_(<2 x s16>) = COPY $vgpr0
718 %1:_(<2 x s16>) = COPY $sgpr0
719 %2:_(<2 x s16>) = G_OR %0, %1
728 liveins: $vgpr0, $vgpr1
729 ; CHECK-LABEL: name: or_v2s16_vv
730 ; CHECK: [[COPY:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr0
731 ; CHECK: [[COPY1:%[0-9]+]]:vgpr(<2 x s16>) = COPY $vgpr1
732 ; CHECK: [[OR:%[0-9]+]]:vgpr(<2 x s16>) = G_OR [[COPY]], [[COPY1]]
733 %0:_(<2 x s16>) = COPY $vgpr0
734 %1:_(<2 x s16>) = COPY $vgpr1
735 %2:_(<2 x s16>) = G_OR %0, %1