1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
4 # Check that we select a 32-bit GPR G_ADD into ADDWrr on GPR32.
5 # Also check that we constrain the register class of the COPY to GPR32.
11 - { id: 0, class: gpr }
12 - { id: 1, class: gpr }
13 - { id: 2, class: gpr }
19 ; CHECK-LABEL: name: add_s32_gpr
20 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
21 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
22 ; CHECK: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr [[COPY]], [[COPY1]]
23 ; CHECK: $w0 = COPY [[ADDWrr]]
26 %2(s32) = G_ADD %0, %1
31 # Same as add_s32_gpr, for 64-bit operations.
37 - { id: 0, class: gpr }
38 - { id: 1, class: gpr }
39 - { id: 2, class: gpr }
45 ; CHECK-LABEL: name: add_s64_gpr
46 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
47 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
48 ; CHECK: [[ADDXrr:%[0-9]+]]:gpr64 = ADDXrr [[COPY]], [[COPY1]]
49 ; CHECK: $x0 = COPY [[ADDXrr]]
52 %2(s64) = G_ADD %0, %1
62 - { id: 0, class: gpr }
63 - { id: 1, class: gpr }
64 - { id: 2, class: gpr }
70 ; CHECK-LABEL: name: add_imm_s32_gpr
71 ; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
72 ; CHECK: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[COPY]], 1, 0
73 ; CHECK: $w0 = COPY [[ADDWri]]
75 %1(s32) = G_CONSTANT i32 1
76 %2(s32) = G_ADD %0, %1
86 - { id: 0, class: gpr }
87 - { id: 1, class: gpr }
88 - { id: 2, class: gpr }
94 ; CHECK-LABEL: name: add_imm_s64_gpr
95 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
96 ; CHECK: [[ADDXri:%[0-9]+]]:gpr64sp = ADDXri [[COPY]], 1, 0
97 ; CHECK: $x0 = COPY [[ADDXri]]
99 %1(s64) = G_CONSTANT i64 1
100 %2(s64) = G_ADD %0, %1
105 name: add_neg_s32_gpr
107 regBankSelected: true
110 - { id: 0, class: gpr }
111 - { id: 1, class: gpr }
112 - { id: 2, class: gpr }
117 ; We should be able to turn the ADD into a SUB.
118 ; CHECK-LABEL: name: add_neg_s32_gpr
119 ; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w1
120 ; CHECK: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
121 ; CHECK: $w2 = COPY [[SUBSWri]]
123 %1(s32) = G_CONSTANT i32 -1
124 %2(s32) = G_ADD %0, %1
129 name: add_neg_s64_gpr
131 regBankSelected: true
134 - { id: 0, class: gpr }
135 - { id: 1, class: gpr }
136 - { id: 2, class: gpr }
141 ; We should be able to turn the ADD into a SUB.
142 ; CHECK-LABEL: name: add_neg_s64_gpr
143 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
144 ; CHECK: [[SUBSXri:%[0-9]+]]:gpr64 = SUBSXri [[COPY]], 1, 0, implicit-def $nzcv
145 ; CHECK: $x0 = COPY [[SUBSXri]]
147 %1(s64) = G_CONSTANT i64 -1
148 %2(s64) = G_ADD %0, %1
153 name: add_neg_invalid_immed_s32
155 regBankSelected: true
158 - { id: 0, class: gpr }
159 - { id: 1, class: gpr }
160 - { id: 2, class: gpr }
165 ; We can't select this if the value is out of range.
166 ; CHECK-LABEL: name: add_neg_invalid_immed_s32
167 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
168 ; CHECK: [[MOVi64imm:%[0-9]+]]:gpr64 = MOVi64imm -5000
169 ; CHECK: [[ADDXrr:%[0-9]+]]:gpr64 = ADDXrr [[COPY]], [[MOVi64imm]]
170 ; CHECK: $x0 = COPY [[ADDXrr]]
172 %1(s64) = G_CONSTANT i64 -5000
173 %2(s64) = G_ADD %0, %1
178 name: add_neg_invalid_immed_s64
180 regBankSelected: true
183 - { id: 0, class: gpr }
184 - { id: 1, class: gpr }
185 - { id: 2, class: gpr }
190 ; We can't select this if the value is out of range.
191 ; CHECK-LABEL: name: add_neg_invalid_immed_s64
192 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
193 ; CHECK: [[MOVi64imm:%[0-9]+]]:gpr64 = MOVi64imm -5000
194 ; CHECK: [[ADDXrr:%[0-9]+]]:gpr64 = ADDXrr [[COPY]], [[MOVi64imm]]
195 ; CHECK: $x0 = COPY [[ADDXrr]]
197 %1(s64) = G_CONSTANT i64 -5000
198 %2(s64) = G_ADD %0, %1
205 regBankSelected: true
208 - { id: 0, class: gpr }
209 - { id: 1, class: gpr }
210 - { id: 2, class: gpr }
215 ; We shouldn't get a SUB here, because "cmp wN, $0" and "cmp wN, #0" have
216 ; opposite effects on the C flag.
217 ; CHECK-LABEL: name: add_imm_0_s32
218 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
219 ; CHECK: [[ADDXri:%[0-9]+]]:gpr64sp = ADDXri [[COPY]], 0, 0
220 ; CHECK: $x0 = COPY [[ADDXri]]
222 %1(s64) = G_CONSTANT i64 0
223 %2(s64) = G_ADD %0, %1
230 regBankSelected: true
233 - { id: 0, class: gpr }
234 - { id: 1, class: gpr }
235 - { id: 2, class: gpr }
240 ; We shouldn't get a SUB here, because "cmp xN, $0" and "cmp xN, #0" have
241 ; opposite effects on the C flag.
242 ; CHECK-LABEL: name: add_imm_0_s64
243 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
244 ; CHECK: [[ADDXri:%[0-9]+]]:gpr64sp = ADDXri [[COPY]], 0, 0
245 ; CHECK: $x0 = COPY [[ADDXri]]
247 %1(s64) = G_CONSTANT i64 0
248 %2(s64) = G_ADD %0, %1
253 name: add_imm_s32_gpr_bb
255 regBankSelected: true
258 - { id: 0, class: gpr }
259 - { id: 1, class: gpr }
260 - { id: 2, class: gpr }
263 ; CHECK-LABEL: name: add_imm_s32_gpr_bb
265 ; CHECK: successors: %bb.1(0x80000000)
266 ; CHECK: [[COPY:%[0-9]+]]:gpr32sp = COPY $w0
269 ; CHECK: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[COPY]], 1, 0
270 ; CHECK: $w0 = COPY [[ADDWri]]
276 %1(s32) = G_CONSTANT i32 1
280 %2(s32) = G_ADD %0, %1
285 # Same as add_s32_gpr, for G_SUB operations.
288 regBankSelected: true
291 - { id: 0, class: gpr }
292 - { id: 1, class: gpr }
293 - { id: 2, class: gpr }
299 ; CHECK-LABEL: name: sub_s32_gpr
300 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
301 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
302 ; CHECK: [[SUBSWrr:%[0-9]+]]:gpr32 = SUBSWrr [[COPY]], [[COPY1]], implicit-def $nzcv
303 ; CHECK: $w0 = COPY [[SUBSWrr]]
306 %2(s32) = G_SUB %0, %1
311 # Same as add_s64_gpr, for G_SUB operations.
314 regBankSelected: true
317 - { id: 0, class: gpr }
318 - { id: 1, class: gpr }
319 - { id: 2, class: gpr }
325 ; CHECK-LABEL: name: sub_s64_gpr
326 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
327 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
328 ; CHECK: [[SUBSXrr:%[0-9]+]]:gpr64 = SUBSXrr [[COPY]], [[COPY1]], implicit-def $nzcv
329 ; CHECK: $x0 = COPY [[SUBSXrr]]
332 %2(s64) = G_SUB %0, %1
337 # Same as add_s32_gpr, for G_OR operations.
340 regBankSelected: true
343 - { id: 0, class: gpr }
344 - { id: 1, class: gpr }
345 - { id: 2, class: gpr }
351 ; CHECK-LABEL: name: or_s32_gpr
352 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
353 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
354 ; CHECK: [[ORRWrr:%[0-9]+]]:gpr32 = ORRWrr [[COPY]], [[COPY1]]
355 ; CHECK: $w0 = COPY [[ORRWrr]]
358 %2(s32) = G_OR %0, %1
363 # Same as add_s64_gpr, for G_OR operations.
366 regBankSelected: true
369 - { id: 0, class: gpr }
370 - { id: 1, class: gpr }
371 - { id: 2, class: gpr }
377 ; CHECK-LABEL: name: or_s64_gpr
378 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
379 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
380 ; CHECK: [[ORRXrr:%[0-9]+]]:gpr64 = ORRXrr [[COPY]], [[COPY1]]
381 ; CHECK: $x0 = COPY [[ORRXrr]]
384 %2(s64) = G_OR %0, %1
389 # 64-bit G_OR on vector registers.
392 regBankSelected: true
395 - { id: 0, class: fpr }
396 - { id: 1, class: fpr }
397 - { id: 2, class: fpr }
399 # The actual OR does not matter as long as it is operating
400 # on 64-bit width vector.
405 ; CHECK-LABEL: name: or_v2s32_fpr
406 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
407 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
408 ; CHECK: [[ORRv8i8_:%[0-9]+]]:fpr64 = ORRv8i8 [[COPY]], [[COPY1]]
409 ; CHECK: $d0 = COPY [[ORRv8i8_]]
410 %0(<2 x s32>) = COPY $d0
411 %1(<2 x s32>) = COPY $d1
412 %2(<2 x s32>) = G_OR %0, %1
413 $d0 = COPY %2(<2 x s32>)
417 # Same as add_s32_gpr, for G_AND operations.
420 regBankSelected: true
423 - { id: 0, class: gpr }
424 - { id: 1, class: gpr }
425 - { id: 2, class: gpr }
431 ; CHECK-LABEL: name: and_s32_gpr
432 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
433 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
434 ; CHECK: [[ANDWrr:%[0-9]+]]:gpr32 = ANDWrr [[COPY]], [[COPY1]]
435 ; CHECK: $w0 = COPY [[ANDWrr]]
438 %2(s32) = G_AND %0, %1
443 # Same as add_s64_gpr, for G_AND operations.
446 regBankSelected: true
449 - { id: 0, class: gpr }
450 - { id: 1, class: gpr }
451 - { id: 2, class: gpr }
457 ; CHECK-LABEL: name: and_s64_gpr
458 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
459 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
460 ; CHECK: [[ANDXrr:%[0-9]+]]:gpr64 = ANDXrr [[COPY]], [[COPY1]]
461 ; CHECK: $x0 = COPY [[ANDXrr]]
464 %2(s64) = G_AND %0, %1
469 # Same as add_s32_gpr, for G_SHL operations.
472 regBankSelected: true
475 - { id: 0, class: gpr }
476 - { id: 1, class: gpr }
477 - { id: 2, class: gpr }
483 ; CHECK-LABEL: name: shl_s32_gpr
484 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
485 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
486 ; CHECK: [[LSLVWr:%[0-9]+]]:gpr32 = LSLVWr [[COPY]], [[COPY1]]
487 ; CHECK: $w0 = COPY [[LSLVWr]]
490 %2(s32) = G_SHL %0, %1
495 # Same as add_s64_gpr, for G_SHL operations.
498 regBankSelected: true
501 - { id: 0, class: gpr }
502 - { id: 1, class: gpr }
503 - { id: 2, class: gpr }
509 ; CHECK-LABEL: name: shl_s64_gpr
510 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
511 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
512 ; CHECK: [[LSLVXr:%[0-9]+]]:gpr64 = LSLVXr [[COPY]], [[COPY1]]
513 ; CHECK: $x0 = COPY [[LSLVXr]]
516 %2(s64) = G_SHL %0, %1
521 # Same as add_s32_gpr, for G_LSHR operations.
524 regBankSelected: true
527 - { id: 0, class: gpr }
528 - { id: 1, class: gpr }
529 - { id: 2, class: gpr }
535 ; CHECK-LABEL: name: lshr_s32_gpr
536 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
537 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
538 ; CHECK: [[LSRVWr:%[0-9]+]]:gpr32 = LSRVWr [[COPY]], [[COPY1]]
539 ; CHECK: $w0 = COPY [[LSRVWr]]
542 %2(s32) = G_LSHR %0, %1
547 # Same as add_s64_gpr, for G_LSHR operations.
550 regBankSelected: true
553 - { id: 0, class: gpr }
554 - { id: 1, class: gpr }
555 - { id: 2, class: gpr }
561 ; CHECK-LABEL: name: lshr_s64_gpr
562 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
563 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
564 ; CHECK: [[LSRVXr:%[0-9]+]]:gpr64 = LSRVXr [[COPY]], [[COPY1]]
565 ; CHECK: $x0 = COPY [[LSRVXr]]
568 %2(s64) = G_LSHR %0, %1
573 # Same as add_s32_gpr, for G_ASHR operations.
576 regBankSelected: true
579 - { id: 0, class: gpr }
580 - { id: 1, class: gpr }
581 - { id: 2, class: gpr }
587 ; CHECK-LABEL: name: ashr_s32_gpr
588 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
589 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
590 ; CHECK: [[ASRVWr:%[0-9]+]]:gpr32 = ASRVWr [[COPY]], [[COPY1]]
591 ; CHECK: $w0 = COPY [[ASRVWr]]
594 %2(s32) = G_ASHR %0, %1
599 # Same as add_s64_gpr, for G_ASHR operations.
602 regBankSelected: true
605 - { id: 0, class: gpr }
606 - { id: 1, class: gpr }
607 - { id: 2, class: gpr }
613 ; CHECK-LABEL: name: ashr_s64_gpr
614 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
615 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
616 ; CHECK: [[ASRVXr:%[0-9]+]]:gpr64 = ASRVXr [[COPY]], [[COPY1]]
617 ; CHECK: $x0 = COPY [[ASRVXr]]
620 %2(s64) = G_ASHR %0, %1
625 # Check that we select s32 GPR G_MUL. This is trickier than other binops because
626 # there is only MADDWrrr, and we have to use the WZR physreg.
629 regBankSelected: true
632 - { id: 0, class: gpr }
633 - { id: 1, class: gpr }
634 - { id: 2, class: gpr }
640 ; CHECK-LABEL: name: mul_s32_gpr
641 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
642 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
643 ; CHECK: [[MADDWrrr:%[0-9]+]]:gpr32 = MADDWrrr [[COPY]], [[COPY1]], $wzr
644 ; CHECK: $w0 = COPY [[MADDWrrr]]
647 %2(s32) = G_MUL %0, %1
652 # Same as mul_s32_gpr for the s64 type.
655 regBankSelected: true
658 - { id: 0, class: gpr }
659 - { id: 1, class: gpr }
660 - { id: 2, class: gpr }
666 ; CHECK-LABEL: name: mul_s64_gpr
667 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
668 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
669 ; CHECK: [[MADDXrrr:%[0-9]+]]:gpr64 = MADDXrrr [[COPY]], [[COPY1]], $xzr
670 ; CHECK: $x0 = COPY [[MADDXrrr]]
673 %2(s64) = G_MUL %0, %1
678 # Same as mul_s32_gpr for the s64 type.
681 regBankSelected: true
688 ; CHECK-LABEL: name: mulh_s64_gpr
689 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
690 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
691 ; CHECK: [[SMULHrr:%[0-9]+]]:gpr64 = SMULHrr [[COPY]], [[COPY1]]
692 ; CHECK: [[UMULHrr:%[0-9]+]]:gpr64 = UMULHrr [[COPY]], [[COPY1]]
693 ; CHECK: $x0 = COPY [[SMULHrr]]
694 ; CHECK: $x0 = COPY [[UMULHrr]]
695 %0:gpr(s64) = COPY $x0
696 %1:gpr(s64) = COPY $x1
697 %2:gpr(s64) = G_SMULH %0, %1
698 %3:gpr(s64) = G_UMULH %0, %1
704 # Same as add_s32_gpr, for G_SDIV operations.
707 regBankSelected: true
710 - { id: 0, class: gpr }
711 - { id: 1, class: gpr }
712 - { id: 2, class: gpr }
718 ; CHECK-LABEL: name: sdiv_s32_gpr
719 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
720 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
721 ; CHECK: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[COPY]], [[COPY1]]
722 ; CHECK: $w0 = COPY [[SDIVWr]]
725 %2(s32) = G_SDIV %0, %1
730 # Same as add_s64_gpr, for G_SDIV operations.
733 regBankSelected: true
736 - { id: 0, class: gpr }
737 - { id: 1, class: gpr }
738 - { id: 2, class: gpr }
744 ; CHECK-LABEL: name: sdiv_s64_gpr
745 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
746 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
747 ; CHECK: [[SDIVXr:%[0-9]+]]:gpr64 = SDIVXr [[COPY]], [[COPY1]]
748 ; CHECK: $x0 = COPY [[SDIVXr]]
751 %2(s64) = G_SDIV %0, %1
756 # Same as add_s32_gpr, for G_UDIV operations.
759 regBankSelected: true
762 - { id: 0, class: gpr }
763 - { id: 1, class: gpr }
764 - { id: 2, class: gpr }
770 ; CHECK-LABEL: name: udiv_s32_gpr
771 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
772 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1
773 ; CHECK: [[UDIVWr:%[0-9]+]]:gpr32 = UDIVWr [[COPY]], [[COPY1]]
774 ; CHECK: $w0 = COPY [[UDIVWr]]
777 %2(s32) = G_UDIV %0, %1
782 # Same as add_s64_gpr, for G_UDIV operations.
785 regBankSelected: true
788 - { id: 0, class: gpr }
789 - { id: 1, class: gpr }
790 - { id: 2, class: gpr }
796 ; CHECK-LABEL: name: udiv_s64_gpr
797 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
798 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
799 ; CHECK: [[UDIVXr:%[0-9]+]]:gpr64 = UDIVXr [[COPY]], [[COPY1]]
800 ; CHECK: $x0 = COPY [[UDIVXr]]
803 %2(s64) = G_UDIV %0, %1
808 # Check that we select a s32 FPR G_FADD into FADDSrr.
811 regBankSelected: true
814 - { id: 0, class: fpr }
815 - { id: 1, class: fpr }
816 - { id: 2, class: fpr }
822 ; CHECK-LABEL: name: fadd_s32_fpr
823 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
824 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
825 ; CHECK: [[FADDSrr:%[0-9]+]]:fpr32 = FADDSrr [[COPY]], [[COPY1]]
826 ; CHECK: $s0 = COPY [[FADDSrr]]
829 %2(s32) = G_FADD %0, %1
836 regBankSelected: true
839 - { id: 0, class: fpr }
840 - { id: 1, class: fpr }
841 - { id: 2, class: fpr }
847 ; CHECK-LABEL: name: fadd_s64_fpr
848 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
849 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
850 ; CHECK: [[FADDDrr:%[0-9]+]]:fpr64 = FADDDrr [[COPY]], [[COPY1]]
851 ; CHECK: $d0 = COPY [[FADDDrr]]
854 %2(s64) = G_FADD %0, %1
861 regBankSelected: true
864 - { id: 0, class: fpr }
865 - { id: 1, class: fpr }
866 - { id: 2, class: fpr }
872 ; CHECK-LABEL: name: fsub_s32_fpr
873 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
874 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
875 ; CHECK: [[FSUBSrr:%[0-9]+]]:fpr32 = FSUBSrr [[COPY]], [[COPY1]]
876 ; CHECK: $s0 = COPY [[FSUBSrr]]
879 %2(s32) = G_FSUB %0, %1
886 regBankSelected: true
889 - { id: 0, class: fpr }
890 - { id: 1, class: fpr }
891 - { id: 2, class: fpr }
897 ; CHECK-LABEL: name: fsub_s64_fpr
898 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
899 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
900 ; CHECK: [[FSUBDrr:%[0-9]+]]:fpr64 = FSUBDrr [[COPY]], [[COPY1]]
901 ; CHECK: $d0 = COPY [[FSUBDrr]]
904 %2(s64) = G_FSUB %0, %1
911 regBankSelected: true
914 - { id: 0, class: fpr }
915 - { id: 1, class: fpr }
916 - { id: 2, class: fpr }
922 ; CHECK-LABEL: name: fmul_s32_fpr
923 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
924 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
925 ; CHECK: [[FMULSrr:%[0-9]+]]:fpr32 = FMULSrr [[COPY]], [[COPY1]]
926 ; CHECK: $s0 = COPY [[FMULSrr]]
929 %2(s32) = G_FMUL %0, %1
936 regBankSelected: true
939 - { id: 0, class: fpr }
940 - { id: 1, class: fpr }
941 - { id: 2, class: fpr }
947 ; CHECK-LABEL: name: fmul_s64_fpr
948 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
949 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
950 ; CHECK: [[FMULDrr:%[0-9]+]]:fpr64 = FMULDrr [[COPY]], [[COPY1]]
951 ; CHECK: $d0 = COPY [[FMULDrr]]
954 %2(s64) = G_FMUL %0, %1
961 regBankSelected: true
964 - { id: 0, class: fpr }
965 - { id: 1, class: fpr }
966 - { id: 2, class: fpr }
972 ; CHECK-LABEL: name: fdiv_s32_fpr
973 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
974 ; CHECK: [[COPY1:%[0-9]+]]:fpr32 = COPY $s1
975 ; CHECK: [[FDIVSrr:%[0-9]+]]:fpr32 = FDIVSrr [[COPY]], [[COPY1]]
976 ; CHECK: $s0 = COPY [[FDIVSrr]]
979 %2(s32) = G_FDIV %0, %1
986 regBankSelected: true
989 - { id: 0, class: fpr }
990 - { id: 1, class: fpr }
991 - { id: 2, class: fpr }
997 ; CHECK-LABEL: name: fdiv_s64_fpr
998 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
999 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
1000 ; CHECK: [[FDIVDrr:%[0-9]+]]:fpr64 = FDIVDrr [[COPY]], [[COPY1]]
1001 ; CHECK: $d0 = COPY [[FDIVDrr]]
1004 %2(s64) = G_FDIV %0, %1
1011 regBankSelected: true
1012 tracksRegLiveness: true
1014 - { id: 0, class: fpr }
1015 - { id: 1, class: fpr }
1016 - { id: 2, class: fpr }
1017 machineFunctionInfo: {}
1022 ; CHECK-LABEL: name: add_v8i16
1023 ; CHECK: liveins: $q0, $q1
1024 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
1025 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
1026 ; CHECK: [[ADDv8i16_:%[0-9]+]]:fpr128 = ADDv8i16 [[COPY]], [[COPY1]]
1027 ; CHECK: $q0 = COPY [[ADDv8i16_]]
1028 ; CHECK: RET_ReallyLR implicit $q0
1029 %0:fpr(<8 x s16>) = COPY $q0
1030 %1:fpr(<8 x s16>) = COPY $q1
1031 %2:fpr(<8 x s16>) = G_ADD %0, %1
1032 $q0 = COPY %2(<8 x s16>)
1033 RET_ReallyLR implicit $q0
1040 regBankSelected: true
1041 tracksRegLiveness: true
1043 - { id: 0, class: fpr }
1044 - { id: 1, class: fpr }
1045 - { id: 2, class: fpr }
1046 machineFunctionInfo: {}
1051 ; CHECK-LABEL: name: add_v16i8
1052 ; CHECK: liveins: $q0, $q1
1053 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
1054 ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
1055 ; CHECK: [[ADDv16i8_:%[0-9]+]]:fpr128 = ADDv16i8 [[COPY]], [[COPY1]]
1056 ; CHECK: $q0 = COPY [[ADDv16i8_]]
1057 ; CHECK: RET_ReallyLR implicit $q0
1058 %0:fpr(<16 x s8>) = COPY $q0
1059 %1:fpr(<16 x s8>) = COPY $q1
1060 %2:fpr(<16 x s8>) = G_ADD %0, %1
1061 $q0 = COPY %2(<16 x s8>)
1062 RET_ReallyLR implicit $q0
1068 regBankSelected: true
1069 tracksRegLiveness: true
1074 ; CHECK-LABEL: name: add_v4i16
1075 ; CHECK: liveins: $d0, $d1
1076 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
1077 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
1078 ; CHECK: [[ADDv4i16_:%[0-9]+]]:fpr64 = ADDv4i16 [[COPY]], [[COPY1]]
1079 ; CHECK: $d0 = COPY [[ADDv4i16_]]
1080 ; CHECK: RET_ReallyLR implicit $d0
1081 %0:fpr(<4 x s16>) = COPY $d0
1082 %1:fpr(<4 x s16>) = COPY $d1
1083 %2:fpr(<4 x s16>) = G_ADD %0, %1
1084 $d0 = COPY %2(<4 x s16>)
1085 RET_ReallyLR implicit $d0
1090 regBankSelected: true
1091 tracksRegLiveness: true
1096 ; CHECK-LABEL: name: or_v4i16
1097 ; CHECK: liveins: $d0, $d1
1098 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
1099 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
1100 ; CHECK: [[ORRv8i8_:%[0-9]+]]:fpr64 = ORRv8i8 [[COPY]], [[COPY1]]
1101 ; CHECK: $d0 = COPY [[ORRv8i8_]]
1102 ; CHECK: RET_ReallyLR implicit $d0
1103 %0:fpr(<4 x s16>) = COPY $d0
1104 %1:fpr(<4 x s16>) = COPY $d1
1105 %2:fpr(<4 x s16>) = G_OR %0, %1
1106 $d0 = COPY %2(<4 x s16>)
1107 RET_ReallyLR implicit $d0
1112 regBankSelected: true
1113 tracksRegLiveness: true
1118 ; CHECK-LABEL: name: xor_v4i16
1119 ; CHECK: liveins: $d0, $d1
1120 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
1121 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
1122 ; CHECK: [[EORv8i8_:%[0-9]+]]:fpr64 = EORv8i8 [[COPY]], [[COPY1]]
1123 ; CHECK: $d0 = COPY [[EORv8i8_]]
1124 ; CHECK: RET_ReallyLR implicit $d0
1125 %0:fpr(<4 x s16>) = COPY $d0
1126 %1:fpr(<4 x s16>) = COPY $d1
1127 %2:fpr(<4 x s16>) = G_XOR %0, %1
1128 $d0 = COPY %2(<4 x s16>)
1129 RET_ReallyLR implicit $d0
1134 regBankSelected: true
1135 tracksRegLiveness: true
1140 ; CHECK-LABEL: name: mul_v4i16
1141 ; CHECK: liveins: $d0, $d1
1142 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
1143 ; CHECK: [[COPY1:%[0-9]+]]:fpr64 = COPY $d1
1144 ; CHECK: [[MULv4i16_:%[0-9]+]]:fpr64 = MULv4i16 [[COPY]], [[COPY1]]
1145 ; CHECK: $d0 = COPY [[MULv4i16_]]
1146 ; CHECK: RET_ReallyLR implicit $d0
1147 %0:fpr(<4 x s16>) = COPY $d0
1148 %1:fpr(<4 x s16>) = COPY $d1
1149 %2:fpr(<4 x s16>) = G_MUL %0, %1
1150 $d0 = COPY %2(<4 x s16>)
1151 RET_ReallyLR implicit $d0