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
5 name: fptrunc_s16_s32_fpr
10 - { id: 0, class: fpr }
11 - { id: 1, class: fpr }
17 ; CHECK-LABEL: name: fptrunc_s16_s32_fpr
18 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
19 ; CHECK: [[FCVTHSr:%[0-9]+]]:fpr16 = nofpexcept FCVTHSr [[COPY]]
20 ; CHECK: $h0 = COPY [[FCVTHSr]]
22 %1(s16) = G_FPTRUNC %0
27 name: fptrunc_s16_s64_fpr
32 - { id: 0, class: fpr }
33 - { id: 1, class: fpr }
39 ; CHECK-LABEL: name: fptrunc_s16_s64_fpr
40 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
41 ; CHECK: [[FCVTHDr:%[0-9]+]]:fpr16 = nofpexcept FCVTHDr [[COPY]]
42 ; CHECK: $h0 = COPY [[FCVTHDr]]
44 %1(s16) = G_FPTRUNC %0
49 name: fptrunc_s32_s64_fpr
54 - { id: 0, class: fpr }
55 - { id: 1, class: fpr }
61 ; CHECK-LABEL: name: fptrunc_s32_s64_fpr
62 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
63 ; CHECK: [[FCVTSDr:%[0-9]+]]:fpr32 = nofpexcept FCVTSDr [[COPY]]
64 ; CHECK: $s0 = COPY [[FCVTSDr]]
66 %1(s32) = G_FPTRUNC %0
71 name: fptrunc_v4s16_v4s32_fpr
76 - { id: 0, class: fpr }
77 - { id: 1, class: fpr }
82 ; CHECK-LABEL: name: fptrunc_v4s16_v4s32_fpr
83 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
84 ; CHECK: [[FCVTNv4i16_:%[0-9]+]]:fpr64 = nofpexcept FCVTNv4i16 [[COPY]]
85 ; CHECK: $d0 = COPY [[FCVTNv4i16_]]
86 %0(<4 x s32>) = COPY $q0
87 %1(<4 x s16>) = G_FPTRUNC %0
88 $d0 = COPY %1(<4 x s16>)
92 name: fptrunc_v2s32_v2s64_fpr
97 - { id: 0, class: fpr }
98 - { id: 1, class: fpr }
103 ; CHECK-LABEL: name: fptrunc_v2s32_v2s64_fpr
104 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
105 ; CHECK: [[FCVTNv2i32_:%[0-9]+]]:fpr64 = nofpexcept FCVTNv2i32 [[COPY]]
106 ; CHECK: $d0 = COPY [[FCVTNv2i32_]]
107 %0(<2 x s64>) = COPY $q0
108 %1(<2 x s32>) = G_FPTRUNC %0
109 $d0 = COPY %1(<2 x s32>)
113 name: fpext_s32_s16_fpr
115 regBankSelected: true
118 - { id: 0, class: fpr }
119 - { id: 1, class: fpr }
125 ; CHECK-LABEL: name: fpext_s32_s16_fpr
126 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
127 ; CHECK: [[FCVTSHr:%[0-9]+]]:fpr32 = nofpexcept FCVTSHr [[COPY]]
128 ; CHECK: $s0 = COPY [[FCVTSHr]]
135 name: fpext_s64_s16_fpr
137 regBankSelected: true
140 - { id: 0, class: fpr }
141 - { id: 1, class: fpr }
147 ; CHECK-LABEL: name: fpext_s64_s16_fpr
148 ; CHECK: [[COPY:%[0-9]+]]:fpr16 = COPY $h0
149 ; CHECK: [[FCVTDHr:%[0-9]+]]:fpr64 = nofpexcept FCVTDHr [[COPY]]
150 ; CHECK: $d0 = COPY [[FCVTDHr]]
157 name: fpext_s64_s32_fpr
159 regBankSelected: true
162 - { id: 0, class: fpr }
163 - { id: 1, class: fpr }
169 ; CHECK-LABEL: name: fpext_s64_s32_fpr
170 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
171 ; CHECK: [[FCVTDSr:%[0-9]+]]:fpr64 = nofpexcept FCVTDSr [[COPY]]
172 ; CHECK: $d0 = COPY [[FCVTDSr]]
179 name: fpext_v4s32_v4s16_fpr
181 regBankSelected: true
184 - { id: 0, class: fpr }
185 - { id: 1, class: fpr }
190 ; CHECK-LABEL: name: fpext_v4s32_v4s16_fpr
191 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
192 ; CHECK: [[FCVTLv4i16_:%[0-9]+]]:fpr128 = nofpexcept FCVTLv4i16 [[COPY]]
193 ; CHECK: $q0 = COPY [[FCVTLv4i16_]]
194 %0(<4 x s16>) = COPY $d0
195 %1(<4 x s32>) = G_FPEXT %0
196 $q0 = COPY %1(<4 x s32>)
200 name: fpext_v2s64_v2s32_fpr
202 regBankSelected: true
205 - { id: 0, class: fpr }
206 - { id: 1, class: fpr }
211 ; CHECK-LABEL: name: fpext_v2s64_v2s32_fpr
212 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
213 ; CHECK: [[FCVTLv2i32_:%[0-9]+]]:fpr128 = nofpexcept FCVTLv2i32 [[COPY]]
214 ; CHECK: $q0 = COPY [[FCVTLv2i32_]]
215 %0(<2 x s32>) = COPY $d0
216 %1(<2 x s64>) = G_FPEXT %0
217 $q0 = COPY %1(<2 x s64>)
221 name: sitofp_s32_s32_fpr_gpr
223 regBankSelected: true
226 - { id: 0, class: gpr }
227 - { id: 1, class: fpr }
233 ; CHECK-LABEL: name: sitofp_s32_s32_fpr_gpr
234 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
235 ; CHECK: [[SCVTFUWSri:%[0-9]+]]:fpr32 = nofpexcept SCVTFUWSri [[COPY]]
236 ; CHECK: $s0 = COPY [[SCVTFUWSri]]
238 %1(s32) = G_SITOFP %0
243 name: sitofp_s32_s32_fpr_fpr
245 regBankSelected: true
248 - { id: 0, class: fpr }
249 - { id: 1, class: fpr }
255 ; CHECK-LABEL: name: sitofp_s32_s32_fpr_fpr
256 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
257 ; CHECK: [[SCVTFv1i32_:%[0-9]+]]:fpr32 = nofpexcept SCVTFv1i32 [[COPY]]
258 ; CHECK: $s0 = COPY [[SCVTFv1i32_]]
260 %1(s32) = G_SITOFP %0
265 name: uitofp_s32_s32_fpr_fpr
267 regBankSelected: true
270 - { id: 0, class: fpr }
271 - { id: 1, class: fpr }
277 ; CHECK-LABEL: name: uitofp_s32_s32_fpr_fpr
278 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
279 ; CHECK: [[UCVTFv1i32_:%[0-9]+]]:fpr32 = nofpexcept UCVTFv1i32 [[COPY]]
280 ; CHECK: $s0 = COPY [[UCVTFv1i32_]]
282 %1(s32) = G_UITOFP %0
287 name: sitofp_s32_s64_fpr
289 regBankSelected: true
292 - { id: 0, class: gpr }
293 - { id: 1, class: fpr }
299 ; CHECK-LABEL: name: sitofp_s32_s64_fpr
300 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
301 ; CHECK: [[SCVTFUXSri:%[0-9]+]]:fpr32 = nofpexcept SCVTFUXSri [[COPY]]
302 ; CHECK: $s0 = COPY [[SCVTFUXSri]]
304 %1(s32) = G_SITOFP %0
309 name: sitofp_s64_s32_fpr
311 regBankSelected: true
314 - { id: 0, class: gpr }
315 - { id: 1, class: fpr }
321 ; CHECK-LABEL: name: sitofp_s64_s32_fpr
322 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
323 ; CHECK: [[SCVTFUWDri:%[0-9]+]]:fpr64 = nofpexcept SCVTFUWDri [[COPY]]
324 ; CHECK: $d0 = COPY [[SCVTFUWDri]]
326 %1(s64) = G_SITOFP %0
331 name: sitofp_s64_s32_fpr_both
333 regBankSelected: true
336 - { id: 0, class: fpr }
337 - { id: 1, class: fpr }
343 ; CHECK-LABEL: name: sitofp_s64_s32_fpr_both
344 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
345 ; CHECK: [[COPY1:%[0-9]+]]:gpr32 = COPY [[COPY]]
346 ; CHECK: [[SCVTFUWDri:%[0-9]+]]:fpr64 = nofpexcept SCVTFUWDri [[COPY1]]
347 ; CHECK: $d0 = COPY [[SCVTFUWDri]]
349 %1(s64) = G_SITOFP %0
354 name: sitofp_s64_s64_fpr
356 regBankSelected: true
359 - { id: 0, class: gpr }
360 - { id: 1, class: fpr }
366 ; CHECK-LABEL: name: sitofp_s64_s64_fpr
367 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
368 ; CHECK: [[SCVTFUXDri:%[0-9]+]]:fpr64 = nofpexcept SCVTFUXDri [[COPY]]
369 ; CHECK: $d0 = COPY [[SCVTFUXDri]]
371 %1(s64) = G_SITOFP %0
376 name: uitofp_s32_s32_fpr
378 regBankSelected: true
381 - { id: 0, class: gpr }
382 - { id: 1, class: fpr }
388 ; CHECK-LABEL: name: uitofp_s32_s32_fpr
389 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
390 ; CHECK: [[UCVTFUWSri:%[0-9]+]]:fpr32 = nofpexcept UCVTFUWSri [[COPY]]
391 ; CHECK: $s0 = COPY [[UCVTFUWSri]]
393 %1(s32) = G_UITOFP %0
398 name: uitofp_s32_s64_fpr
400 regBankSelected: true
403 - { id: 0, class: gpr }
404 - { id: 1, class: fpr }
410 ; CHECK-LABEL: name: uitofp_s32_s64_fpr
411 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
412 ; CHECK: [[UCVTFUXSri:%[0-9]+]]:fpr32 = nofpexcept UCVTFUXSri [[COPY]]
413 ; CHECK: $s0 = COPY [[UCVTFUXSri]]
415 %1(s32) = G_UITOFP %0
420 name: uitofp_s64_s32_fpr
422 regBankSelected: true
425 - { id: 0, class: gpr }
426 - { id: 1, class: fpr }
432 ; CHECK-LABEL: name: uitofp_s64_s32_fpr
433 ; CHECK: [[COPY:%[0-9]+]]:gpr32 = COPY $w0
434 ; CHECK: [[UCVTFUWDri:%[0-9]+]]:fpr64 = nofpexcept UCVTFUWDri [[COPY]]
435 ; CHECK: $d0 = COPY [[UCVTFUWDri]]
437 %1(s64) = G_UITOFP %0
442 name: uitofp_s64_s64_fpr
444 regBankSelected: true
447 - { id: 0, class: gpr }
448 - { id: 1, class: fpr }
454 ; CHECK-LABEL: name: uitofp_s64_s64_fpr
455 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
456 ; CHECK: [[UCVTFUXDri:%[0-9]+]]:fpr64 = nofpexcept UCVTFUXDri [[COPY]]
457 ; CHECK: $d0 = COPY [[UCVTFUXDri]]
459 %1(s64) = G_UITOFP %0
464 name: fptosi_s32_s32_gpr
466 regBankSelected: true
469 - { id: 0, class: fpr }
470 - { id: 1, class: gpr }
476 ; CHECK-LABEL: name: fptosi_s32_s32_gpr
477 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
478 ; CHECK: [[FCVTZSUWSr:%[0-9]+]]:gpr32 = nofpexcept FCVTZSUWSr [[COPY]]
479 ; CHECK: $w0 = COPY [[FCVTZSUWSr]]
481 %1(s32) = G_FPTOSI %0
486 name: fptosi_s32_s64_gpr
488 regBankSelected: true
491 - { id: 0, class: fpr }
492 - { id: 1, class: gpr }
498 ; CHECK-LABEL: name: fptosi_s32_s64_gpr
499 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
500 ; CHECK: [[FCVTZSUWDr:%[0-9]+]]:gpr32 = nofpexcept FCVTZSUWDr [[COPY]]
501 ; CHECK: $w0 = COPY [[FCVTZSUWDr]]
503 %1(s32) = G_FPTOSI %0
508 name: fptosi_s64_s32_gpr
510 regBankSelected: true
513 - { id: 0, class: fpr }
514 - { id: 1, class: gpr }
520 ; CHECK-LABEL: name: fptosi_s64_s32_gpr
521 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
522 ; CHECK: [[FCVTZSUXSr:%[0-9]+]]:gpr64 = nofpexcept FCVTZSUXSr [[COPY]]
523 ; CHECK: $x0 = COPY [[FCVTZSUXSr]]
525 %1(s64) = G_FPTOSI %0
530 name: fptosi_s64_s64_gpr
532 regBankSelected: true
535 - { id: 0, class: fpr }
536 - { id: 1, class: gpr }
542 ; CHECK-LABEL: name: fptosi_s64_s64_gpr
543 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
544 ; CHECK: [[FCVTZSUXDr:%[0-9]+]]:gpr64 = nofpexcept FCVTZSUXDr [[COPY]]
545 ; CHECK: $x0 = COPY [[FCVTZSUXDr]]
547 %1(s64) = G_FPTOSI %0
552 name: fptoui_s32_s32_gpr
554 regBankSelected: true
557 - { id: 0, class: fpr }
558 - { id: 1, class: gpr }
564 ; CHECK-LABEL: name: fptoui_s32_s32_gpr
565 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
566 ; CHECK: [[FCVTZUUWSr:%[0-9]+]]:gpr32 = nofpexcept FCVTZUUWSr [[COPY]]
567 ; CHECK: $w0 = COPY [[FCVTZUUWSr]]
569 %1(s32) = G_FPTOUI %0
574 name: fptoui_s32_s64_gpr
576 regBankSelected: true
579 - { id: 0, class: fpr }
580 - { id: 1, class: gpr }
586 ; CHECK-LABEL: name: fptoui_s32_s64_gpr
587 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
588 ; CHECK: [[FCVTZUUWDr:%[0-9]+]]:gpr32 = nofpexcept FCVTZUUWDr [[COPY]]
589 ; CHECK: $w0 = COPY [[FCVTZUUWDr]]
591 %1(s32) = G_FPTOUI %0
596 name: fptoui_s64_s32_gpr
598 regBankSelected: true
601 - { id: 0, class: fpr }
602 - { id: 1, class: gpr }
608 ; CHECK-LABEL: name: fptoui_s64_s32_gpr
609 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
610 ; CHECK: [[FCVTZUUXSr:%[0-9]+]]:gpr64 = nofpexcept FCVTZUUXSr [[COPY]]
611 ; CHECK: $x0 = COPY [[FCVTZUUXSr]]
613 %1(s64) = G_FPTOUI %0
618 name: fptoui_s64_s64_gpr
620 regBankSelected: true
623 - { id: 0, class: fpr }
624 - { id: 1, class: gpr }
630 ; CHECK-LABEL: name: fptoui_s64_s64_gpr
631 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
632 ; CHECK: [[FCVTZUUXDr:%[0-9]+]]:gpr64 = nofpexcept FCVTZUUXDr [[COPY]]
633 ; CHECK: $x0 = COPY [[FCVTZUUXDr]]
635 %1(s64) = G_FPTOUI %0
640 name: sitofp_v2s64_v2s32
642 regBankSelected: true
648 ; CHECK-LABEL: name: sitofp_v2s64_v2s32
649 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
650 ; CHECK: [[SSHLLv2i32_shift:%[0-9]+]]:fpr128 = SSHLLv2i32_shift [[COPY]], 0
651 ; CHECK: [[SCVTFv2f64_:%[0-9]+]]:fpr128 = nofpexcept SCVTFv2f64 [[SSHLLv2i32_shift]]
652 ; CHECK: $q0 = COPY [[SCVTFv2f64_]]
653 %0:fpr(<2 x s32>) = COPY $d0
654 %1:fpr(<2 x s64>) = G_SITOFP %0
655 $q0 = COPY %1(<2 x s64>)
659 name: uitofp_v2s64_v2s32
661 regBankSelected: true
667 ; CHECK-LABEL: name: uitofp_v2s64_v2s32
668 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
669 ; CHECK: [[USHLLv2i32_shift:%[0-9]+]]:fpr128 = USHLLv2i32_shift [[COPY]], 0
670 ; CHECK: [[UCVTFv2f64_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv2f64 [[USHLLv2i32_shift]]
671 ; CHECK: $q0 = COPY [[UCVTFv2f64_]]
672 %0:fpr(<2 x s32>) = COPY $d0
673 %1:fpr(<2 x s64>) = G_UITOFP %0
674 $q0 = COPY %1(<2 x s64>)
678 name: sitofp_v2s32_v2s64
680 regBankSelected: true
686 ; CHECK-LABEL: name: sitofp_v2s32_v2s64
687 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
688 ; CHECK: [[SCVTFv2f64_:%[0-9]+]]:fpr128 = nofpexcept SCVTFv2f64 [[COPY]]
689 ; CHECK: [[FCVTNv2i32_:%[0-9]+]]:fpr64 = nofpexcept FCVTNv2i32 [[SCVTFv2f64_]]
690 ; CHECK: $d0 = COPY [[FCVTNv2i32_]]
691 %0:fpr(<2 x s64>) = COPY $q0
692 %1:fpr(<2 x s32>) = G_SITOFP %0
693 $d0 = COPY %1(<2 x s32>)
697 name: uitofp_v2s32_v2s64
699 regBankSelected: true
705 ; CHECK-LABEL: name: uitofp_v2s32_v2s64
706 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
707 ; CHECK: [[UCVTFv2f64_:%[0-9]+]]:fpr128 = nofpexcept UCVTFv2f64 [[COPY]]
708 ; CHECK: [[FCVTNv2i32_:%[0-9]+]]:fpr64 = nofpexcept FCVTNv2i32 [[UCVTFv2f64_]]
709 ; CHECK: $d0 = COPY [[FCVTNv2i32_]]
710 %0:fpr(<2 x s64>) = COPY $q0
711 %1:fpr(<2 x s32>) = G_UITOFP %0
712 $d0 = COPY %1(<2 x s32>)
716 name: fptosi_v2s64_v2s32
718 regBankSelected: true
724 ; CHECK-LABEL: name: fptosi_v2s64_v2s32
725 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
726 ; CHECK: [[FCVTLv2i32_:%[0-9]+]]:fpr128 = nofpexcept FCVTLv2i32 [[COPY]]
727 ; CHECK: [[FCVTZSv2f64_:%[0-9]+]]:fpr128 = nofpexcept FCVTZSv2f64 [[FCVTLv2i32_]]
728 ; CHECK: $q0 = COPY [[FCVTZSv2f64_]]
729 %0:fpr(<2 x s32>) = COPY $d0
730 %1:fpr(<2 x s64>) = G_FPTOSI %0
731 $q0 = COPY %1(<2 x s64>)
735 name: fptoui_v2s64_v2s32
737 regBankSelected: true
743 ; CHECK-LABEL: name: fptoui_v2s64_v2s32
744 ; CHECK: [[COPY:%[0-9]+]]:fpr64 = COPY $d0
745 ; CHECK: [[FCVTLv2i32_:%[0-9]+]]:fpr128 = nofpexcept FCVTLv2i32 [[COPY]]
746 ; CHECK: [[FCVTZUv2f64_:%[0-9]+]]:fpr128 = nofpexcept FCVTZUv2f64 [[FCVTLv2i32_]]
747 ; CHECK: $q0 = COPY [[FCVTZUv2f64_]]
748 %0:fpr(<2 x s32>) = COPY $d0
749 %1:fpr(<2 x s64>) = G_FPTOUI %0
750 $q0 = COPY %1(<2 x s64>)
754 name: fptosi_v2s32_v2s64
756 regBankSelected: true
762 ; CHECK-LABEL: name: fptosi_v2s32_v2s64
763 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
764 ; CHECK: [[FCVTZSv2f64_:%[0-9]+]]:fpr128 = nofpexcept FCVTZSv2f64 [[COPY]]
765 ; CHECK: [[XTNv2i32_:%[0-9]+]]:fpr64 = XTNv2i32 [[FCVTZSv2f64_]]
766 ; CHECK: $d0 = COPY [[XTNv2i32_]]
767 %0:fpr(<2 x s64>) = COPY $q0
768 %1:fpr(<2 x s32>) = G_FPTOSI %0
769 $d0 = COPY %1(<2 x s32>)
773 name: fptoui_v2s32_v2s64
775 regBankSelected: true
781 ; CHECK-LABEL: name: fptoui_v2s32_v2s64
782 ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
783 ; CHECK: [[FCVTZUv2f64_:%[0-9]+]]:fpr128 = nofpexcept FCVTZUv2f64 [[COPY]]
784 ; CHECK: [[XTNv2i32_:%[0-9]+]]:fpr64 = XTNv2i32 [[FCVTZUv2f64_]]
785 ; CHECK: $d0 = COPY [[XTNv2i32_]]
786 %0:fpr(<2 x s64>) = COPY $q0
787 %1:fpr(<2 x s32>) = G_FPTOUI %0
788 $d0 = COPY %1(<2 x s32>)