1 # RUN: llc -run-pass ppc-mi-peepholes -ppc-convert-rr-to-ri %s -o - | FileCheck %s
2 # RUN: llc -start-after ppc-mi-peepholes -ppc-late-peephole %s -o - | FileCheck %s --check-prefix=CHECK-LATE
5 ; ModuleID = 'convert-rr-to-ri-instrs.ll'
6 source_filename = "convert-rr-to-ri-instrs.c"
7 target datalayout = "e-m:e-i64:64-n32:64"
8 target triple = "powerpc64le-unknown-linux-gnu"
10 ; Function Attrs: norecurse nounwind readnone
11 define zeroext i32 @testRLWNM(i32 zeroext %a) local_unnamed_addr #0 {
14 %and = and i32 %shl, 4080
18 ; Function Attrs: norecurse nounwind readnone
19 define i64 @testRLWNM8(i64 %a) local_unnamed_addr #0 {
22 %and = and i64 %shl, 4080
26 ; Function Attrs: norecurse nounwind readnone
27 define zeroext i32 @testRLWNMo(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {
29 %and = and i32 %a, 255
30 %tobool = icmp eq i32 %and, 0
31 %cond = select i1 %tobool, i32 %b, i32 %a
35 ; Function Attrs: norecurse nounwind readnone
36 define i64 @testRLWNM8o(i64 %a, i64 %b) local_unnamed_addr #0 {
38 %a.tr = trunc i64 %a to i32
40 %conv = and i32 %0, 4080
41 %tobool = icmp eq i32 %conv, 0
42 %conv1 = zext i32 %conv to i64
43 %cond = select i1 %tobool, i64 %b, i64 %conv1
47 ; Function Attrs: norecurse nounwind readnone
48 define zeroext i32 @testSLW(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {
54 ; Function Attrs: norecurse nounwind readnone
55 define zeroext i32 @testSLWo(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {
58 %tobool = icmp eq i32 %shl, 0
59 %cond = select i1 %tobool, i32 %b, i32 %a
63 ; Function Attrs: norecurse nounwind readnone
64 define zeroext i32 @testSRW(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {
66 %shr = lshr i32 %a, %b
70 ; Function Attrs: norecurse nounwind readnone
71 define zeroext i32 @testSRWo(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {
73 %shr = lshr i32 %a, %b
74 %tobool = icmp eq i32 %shr, 0
75 %cond = select i1 %tobool, i32 %b, i32 %a
79 ; Function Attrs: norecurse nounwind readnone
80 define signext i32 @testSRAW(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {
82 %shr = ashr i32 %a, %b
86 ; Function Attrs: norecurse nounwind readnone
87 define signext i32 @testSRAWo(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {
89 %shr = ashr i32 %a, %b
90 %tobool = icmp eq i32 %shr, 0
91 %cond = select i1 %tobool, i32 %b, i32 %shr
95 ; Function Attrs: norecurse nounwind readnone
96 define i64 @testRLDCL(i64 %a, i64 %b) local_unnamed_addr #0 {
99 %shl = shl i64 %a, %and
100 %sub = sub nsw i64 64, %and
101 %shr = lshr i64 %a, %sub
102 %or = or i64 %shr, %shl
106 ; Function Attrs: norecurse nounwind readnone
107 define i64 @testRLDCLo(i64 %a, i64 %b) local_unnamed_addr #0 {
109 %and = and i64 %b, 63
110 %shl = shl i64 %a, %and
111 %sub = sub nsw i64 64, %and
112 %shr = lshr i64 %a, %sub
113 %or = or i64 %shr, %shl
114 %tobool = icmp eq i64 %or, 0
115 %cond = select i1 %tobool, i64 %and, i64 %a
119 ; Function Attrs: norecurse nounwind readnone
120 define i64 @testRLDCR(i64 %a, i64 %b) local_unnamed_addr #0 {
122 %and = and i64 %b, 63
123 %shl = shl i64 %a, %and
124 %sub = sub nsw i64 64, %and
125 %shr = lshr i64 %a, %sub
126 %or = or i64 %shr, %shl
130 ; Function Attrs: norecurse nounwind readnone
131 define i64 @testRLDCRo(i64 %a, i64 %b) local_unnamed_addr #0 {
133 %and = and i64 %b, 63
134 %shl = shl i64 %a, %and
135 %sub = sub nsw i64 64, %and
136 %shr = lshr i64 %a, %sub
137 %or = or i64 %shr, %shl
138 %tobool = icmp eq i64 %or, 0
139 %cond = select i1 %tobool, i64 %and, i64 %a
143 define i64 @testSLD(i64 %a, i64 %b) local_unnamed_addr #0 {
145 %shl = shl i64 %a, %b
149 ; Function Attrs: norecurse nounwind readnone
150 define i64 @testSLDo(i64 %a, i64 %b) local_unnamed_addr #0 {
152 %shl = shl i64 %a, %b
153 %tobool = icmp eq i64 %shl, 0
154 %cond = select i1 %tobool, i64 %b, i64 %a
158 ; Function Attrs: norecurse nounwind readnone
159 define i64 @testSRD(i64 %a, i64 %b) local_unnamed_addr #0 {
161 %shr = lshr i64 %a, %b
165 ; Function Attrs: norecurse nounwind readnone
166 define i64 @testSRDo(i64 %a, i64 %b) local_unnamed_addr #0 {
168 %shr = lshr i64 %a, %b
169 %tobool = icmp eq i64 %shr, 0
170 %cond = select i1 %tobool, i64 %b, i64 %a
174 ; Function Attrs: norecurse nounwind readnone
175 define i64 @testSRAD(i64 %a, i64 %b) local_unnamed_addr #0 {
177 %shr = ashr i64 %a, %b
181 ; Function Attrs: norecurse nounwind readnone
182 define i64 @testSRADo(i64 %a, i64 %b) local_unnamed_addr #0 {
184 %shr = ashr i64 %a, %b
185 %tobool = icmp eq i64 %shr, 0
186 %cond = select i1 %tobool, i64 %b, i64 %shr
190 attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pwr9" "target-features"="+altivec,+bpermd,+crypto,+direct-move,+extdiv,+htm,+power8-vector,+power9-vector,+vsx,-qpx" "unsafe-fp-math"="false" "use-soft-float"="false" }
192 !llvm.module.flags = !{!0, !1}
195 !0 = !{i32 1, !"wchar_size", i32 4}
196 !1 = !{i32 7, !"PIC Level", i32 2}
197 !2 = !{!"clang version 6.0.0 (trunk 316067)"}
198 !3 = !{!4, !4, i64 0}
199 !4 = !{!"omnipotent char", !5, i64 0}
200 !5 = !{!"Simple C/C++ TBAA"}
201 !6 = !{!7, !7, i64 0}
202 !7 = !{!"short", !4, i64 0}
203 !8 = !{!9, !9, i64 0}
204 !9 = !{!"int", !4, i64 0}
205 !10 = !{!11, !11, i64 0}
206 !11 = !{!"long long", !4, i64 0}
207 !12 = !{!13, !13, i64 0}
208 !13 = !{!"double", !4, i64 0}
209 !14 = !{!15, !15, i64 0}
210 !15 = !{!"float", !4, i64 0}
215 # CHECK-ALL: name: testRLWNM
217 exposesReturnsTwice: false
219 regBankSelected: false
221 tracksRegLiveness: true
223 - { id: 0, class: g8rc, preferred-register: '' }
224 - { id: 1, class: gprc, preferred-register: '' }
225 - { id: 2, class: gprc, preferred-register: '' }
226 - { id: 3, class: g8rc, preferred-register: '' }
227 - { id: 4, class: gprc, preferred-register: '' }
229 - { reg: '$x3', virtual-reg: '%0' }
231 isFrameAddressTaken: false
232 isReturnAddressTaken: false
241 maxCallFrameSize: 4294967295
242 hasOpaqueSPAdjustment: false
244 hasMustTailInVarArgFunc: false
258 %4 = RLWNM killed %1, %2, 20, 27
259 ; CHECK: RLWINM killed %1, 10, 20, 27
260 ; CHECK-LATE: rlwinm 3, 3, 10, 20, 27
262 BLR8 implicit $lr8, implicit $rm, implicit $x3
267 # CHECK-ALL: name: testRLWNM8
269 exposesReturnsTwice: false
271 regBankSelected: false
273 tracksRegLiveness: true
275 - { id: 0, class: g8rc, preferred-register: '' }
276 - { id: 1, class: g8rc, preferred-register: '' }
277 - { id: 2, class: g8rc, preferred-register: '' }
279 - { reg: '$x3', virtual-reg: '%0' }
281 isFrameAddressTaken: false
282 isReturnAddressTaken: false
291 maxCallFrameSize: 4294967295
292 hasOpaqueSPAdjustment: false
294 hasMustTailInVarArgFunc: false
306 %2 = RLWNM8 %1, %0, 20, 27
307 ; CHECK: RLWINM8 %1, 10, 20, 27
308 ; CHECK-LATE: rlwinm 3, 3, 10, 20, 27
310 BLR8 implicit $lr8, implicit $rm, implicit $x3
315 # CHECK-ALL: name: testRLWNMo
317 exposesReturnsTwice: false
319 regBankSelected: false
321 tracksRegLiveness: true
323 - { id: 0, class: g8rc, preferred-register: '' }
324 - { id: 1, class: g8rc, preferred-register: '' }
325 - { id: 2, class: gprc_and_gprc_nor0, preferred-register: '' }
326 - { id: 3, class: gprc_and_gprc_nor0, preferred-register: '' }
327 - { id: 4, class: gprc, preferred-register: '' }
328 - { id: 5, class: crrc, preferred-register: '' }
329 - { id: 6, class: gprc, preferred-register: '' }
330 - { id: 7, class: g8rc, preferred-register: '' }
331 - { id: 8, class: g8rc, preferred-register: '' }
332 - { id: 9, class: g8rc, preferred-register: '' }
334 - { reg: '$x3', virtual-reg: '%0' }
335 - { reg: '$x4', virtual-reg: '%1' }
337 isFrameAddressTaken: false
338 isReturnAddressTaken: false
347 maxCallFrameSize: 4294967295
348 hasOpaqueSPAdjustment: false
350 hasMustTailInVarArgFunc: false
364 %4 = RLWNMo %2, %3, 24, 31, implicit-def $cr0
365 ; CHECK: RLWINMo %2, 10, 24, 31, implicit-def $cr0
366 ; CHECK-LATE: li 3, -22
367 ; CHECK-LATE: rlwinm. 5, 4, 10, 24, 31
368 %5 = COPY killed $cr0
369 %6 = ISEL %2, %3, %5.sub_eq
371 %7 = INSERT_SUBREG %8, killed %6, 1
372 %9 = RLDICL killed %7, 0, 32
374 BLR8 implicit $lr8, implicit $rm, implicit $x3
379 # CHECK-ALL: name: testRLWNM8o
381 exposesReturnsTwice: false
383 regBankSelected: false
385 tracksRegLiveness: true
387 - { id: 0, class: g8rc, preferred-register: '' }
388 - { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' }
389 - { id: 2, class: g8rc, preferred-register: '' }
390 - { id: 3, class: g8rc, preferred-register: '' }
391 - { id: 4, class: g8rc, preferred-register: '' }
392 - { id: 5, class: g8rc, preferred-register: '' }
393 - { id: 6, class: g8rc_and_g8rc_nox0, preferred-register: '' }
394 - { id: 7, class: crrc, preferred-register: '' }
395 - { id: 8, class: g8rc, preferred-register: '' }
397 - { reg: '$x3', virtual-reg: '%0' }
398 - { reg: '$x4', virtual-reg: '%1' }
400 isFrameAddressTaken: false
401 isReturnAddressTaken: false
410 maxCallFrameSize: 4294967295
411 hasOpaqueSPAdjustment: false
413 hasMustTailInVarArgFunc: false
426 %3 = RLWNM8o %1, %2, 20, 27, implicit-def $cr0
427 ; CHECK: RLWINM8o %1, 14, 20, 27, implicit-def $cr0
428 ; CHECK-LATE: rlwinm. 3, 4, 14, 20, 27
429 %7 = COPY killed $cr0
430 %6 = RLDICL killed %3, 0, 32
431 %8 = ISEL8 %1, %6, %7.sub_eq
433 BLR8 implicit $lr8, implicit $rm, implicit $x3
438 # CHECK-ALL: name: testSLW
440 exposesReturnsTwice: false
442 regBankSelected: false
444 tracksRegLiveness: true
446 - { id: 0, class: g8rc, preferred-register: '' }
447 - { id: 1, class: g8rc, preferred-register: '' }
448 - { id: 2, class: gprc, preferred-register: '' }
449 - { id: 3, class: g8rc, preferred-register: '' }
450 - { id: 4, class: g8rc, preferred-register: '' }
451 - { id: 5, class: gprc, preferred-register: '' }
452 - { id: 6, class: g8rc, preferred-register: '' }
453 - { id: 7, class: g8rc, preferred-register: '' }
454 - { id: 8, class: gprc, preferred-register: '' }
456 - { reg: '$x3', virtual-reg: '%0' }
457 - { reg: '$x4', virtual-reg: '%1' }
459 isFrameAddressTaken: false
460 isReturnAddressTaken: false
469 maxCallFrameSize: 4294967295
470 hasOpaqueSPAdjustment: false
472 hasMustTailInVarArgFunc: false
486 %8 = SLW killed %2, killed %5
487 ; CHECK: RLWINM killed %2, 18, 0, 13
488 ; CHECK-LATE: slwi 3, 4, 18
490 BLR8 implicit $lr8, implicit $rm, implicit $x3
495 # CHECK-ALL: name: testSLWo
497 exposesReturnsTwice: false
499 regBankSelected: false
501 tracksRegLiveness: true
503 - { id: 0, class: g8rc, preferred-register: '' }
504 - { id: 1, class: g8rc, preferred-register: '' }
505 - { id: 2, class: gprc_and_gprc_nor0, preferred-register: '' }
506 - { id: 3, class: gprc_and_gprc_nor0, preferred-register: '' }
507 - { id: 4, class: gprc, preferred-register: '' }
508 - { id: 5, class: crrc, preferred-register: '' }
509 - { id: 6, class: gprc, preferred-register: '' }
510 - { id: 7, class: g8rc, preferred-register: '' }
511 - { id: 8, class: g8rc, preferred-register: '' }
512 - { id: 9, class: g8rc, preferred-register: '' }
514 - { reg: '$x3', virtual-reg: '%0' }
515 - { reg: '$x4', virtual-reg: '%1' }
517 isFrameAddressTaken: false
518 isReturnAddressTaken: false
527 maxCallFrameSize: 4294967295
528 hasOpaqueSPAdjustment: false
530 hasMustTailInVarArgFunc: false
544 %4 = SLWo %3, %2, implicit-def $cr0
545 ; CHECK: ANDIo %3, 0, implicit-def $cr0
546 ; CHECK-LATE: andi. 5, 3, 0
547 %5 = COPY killed $cr0
548 %6 = ISEL %2, %3, %5.sub_eq
550 %7 = INSERT_SUBREG %8, killed %6, 1
551 %9 = RLDICL killed %7, 0, 32
553 BLR8 implicit $lr8, implicit $rm, implicit $x3
558 # CHECK-ALL: name: testSRW
560 exposesReturnsTwice: false
562 regBankSelected: false
564 tracksRegLiveness: true
566 - { id: 0, class: g8rc, preferred-register: '' }
567 - { id: 1, class: g8rc, preferred-register: '' }
568 - { id: 2, class: gprc, preferred-register: '' }
569 - { id: 3, class: g8rc, preferred-register: '' }
570 - { id: 4, class: g8rc, preferred-register: '' }
571 - { id: 5, class: gprc, preferred-register: '' }
572 - { id: 6, class: g8rc, preferred-register: '' }
573 - { id: 7, class: g8rc, preferred-register: '' }
574 - { id: 8, class: gprc, preferred-register: '' }
576 - { reg: '$x3', virtual-reg: '%0' }
577 - { reg: '$x4', virtual-reg: '%1' }
579 isFrameAddressTaken: false
580 isReturnAddressTaken: false
589 maxCallFrameSize: 4294967295
590 hasOpaqueSPAdjustment: false
592 hasMustTailInVarArgFunc: false
606 %8 = SRW killed %5, killed %2
608 ; CHECK-LATE: li 3, 0
610 BLR8 implicit $lr8, implicit $rm, implicit $x3
615 # CHECK-ALL: name: testSRWo
617 exposesReturnsTwice: false
619 regBankSelected: false
621 tracksRegLiveness: true
623 - { id: 0, class: g8rc, preferred-register: '' }
624 - { id: 1, class: g8rc, preferred-register: '' }
625 - { id: 2, class: gprc_and_gprc_nor0, preferred-register: '' }
626 - { id: 3, class: gprc_and_gprc_nor0, preferred-register: '' }
627 - { id: 4, class: gprc, preferred-register: '' }
628 - { id: 5, class: crrc, preferred-register: '' }
629 - { id: 6, class: gprc, preferred-register: '' }
630 - { id: 7, class: g8rc, preferred-register: '' }
631 - { id: 8, class: g8rc, preferred-register: '' }
632 - { id: 9, class: g8rc, preferred-register: '' }
634 - { reg: '$x3', virtual-reg: '%0' }
635 - { reg: '$x4', virtual-reg: '%1' }
637 isFrameAddressTaken: false
638 isReturnAddressTaken: false
647 maxCallFrameSize: 4294967295
648 hasOpaqueSPAdjustment: false
650 hasMustTailInVarArgFunc: false
664 %4 = SRWo %3, %2, implicit-def $cr0
665 ; CHECK: ANDIo %3, 0, implicit-def $cr0
666 ; CHECK-LATE: andi. 5, 3, 0
667 %5 = COPY killed $cr0
668 %6 = ISEL %2, %3, %5.sub_eq
670 %7 = INSERT_SUBREG %8, killed %6, 1
671 %9 = RLDICL killed %7, 0, 32
673 BLR8 implicit $lr8, implicit $rm, implicit $x3
678 # CHECK-ALL: name: testSRAW
680 exposesReturnsTwice: false
682 regBankSelected: false
684 tracksRegLiveness: true
686 - { id: 0, class: g8rc, preferred-register: '' }
687 - { id: 1, class: g8rc, preferred-register: '' }
688 - { id: 2, class: gprc, preferred-register: '' }
689 - { id: 3, class: gprc, preferred-register: '' }
690 - { id: 4, class: gprc, preferred-register: '' }
691 - { id: 5, class: g8rc, preferred-register: '' }
693 - { reg: '$x3', virtual-reg: '%0' }
694 - { reg: '$x4', virtual-reg: '%1' }
696 isFrameAddressTaken: false
697 isReturnAddressTaken: false
706 maxCallFrameSize: 4294967295
707 hasOpaqueSPAdjustment: false
709 hasMustTailInVarArgFunc: false
723 %4 = SRAW killed %3, killed %2, implicit-def dead $carry
725 ; CHECK: SRAW killed %3, killed %2, implicit-def dead $carry
726 ; CHECK-LATE: sraw 3, 3, 4
727 %5 = EXTSW_32_64 killed %4
729 BLR8 implicit $lr8, implicit $rm, implicit $x3
734 # CHECK-ALL: name: testSRAWo
736 exposesReturnsTwice: false
738 regBankSelected: false
740 tracksRegLiveness: true
742 - { id: 0, class: g8rc, preferred-register: '' }
743 - { id: 1, class: g8rc, preferred-register: '' }
744 - { id: 2, class: gprc_and_gprc_nor0, preferred-register: '' }
745 - { id: 3, class: gprc, preferred-register: '' }
746 - { id: 4, class: gprc_and_gprc_nor0, preferred-register: '' }
747 - { id: 5, class: crrc, preferred-register: '' }
748 - { id: 6, class: gprc, preferred-register: '' }
749 - { id: 7, class: g8rc, preferred-register: '' }
751 - { reg: '$x3', virtual-reg: '%0' }
752 - { reg: '$x4', virtual-reg: '%1' }
754 isFrameAddressTaken: false
755 isReturnAddressTaken: false
764 maxCallFrameSize: 4294967295
765 hasOpaqueSPAdjustment: false
767 hasMustTailInVarArgFunc: false
781 %4 = SRAWo killed %3, %2, implicit-def dead $carry, implicit-def $cr0
782 ; CHECK: SRAWo killed %3, %2, implicit-def dead $carry, implicit-def $cr0
783 ; CHECK-LATE: sraw. 3, 3, 4
784 %5 = COPY killed $cr0
785 %6 = ISEL %2, %4, %5.sub_eq
786 %7 = EXTSW_32_64 killed %6
788 BLR8 implicit $lr8, implicit $rm, implicit $x3
793 # CHECK-ALL: name: testRLDCL
795 exposesReturnsTwice: false
797 regBankSelected: false
799 tracksRegLiveness: true
801 - { id: 0, class: g8rc, preferred-register: '' }
802 - { id: 1, class: g8rc, preferred-register: '' }
803 - { id: 2, class: gprc, preferred-register: '' }
804 - { id: 3, class: gprc, preferred-register: '' }
805 - { id: 4, class: g8rc, preferred-register: '' }
807 - { reg: '$x3', virtual-reg: '%0' }
808 - { reg: '$x4', virtual-reg: '%1' }
810 isFrameAddressTaken: false
811 isReturnAddressTaken: false
820 maxCallFrameSize: 4294967295
821 hasOpaqueSPAdjustment: false
823 hasMustTailInVarArgFunc: false
837 %4 = RLDCL %0, killed %3, 0
838 ; CHECK: RLDICL %0, 12, 0
839 ; CHECK-LATE: rotldi 3, 3, 12
841 BLR8 implicit $lr8, implicit $rm, implicit $x3
846 # CHECK-ALL: name: testRLDCLo
848 exposesReturnsTwice: false
850 regBankSelected: false
852 tracksRegLiveness: true
854 - { id: 0, class: g8rc_and_g8rc_nox0, preferred-register: '' }
855 - { id: 1, class: g8rc, preferred-register: '' }
856 - { id: 2, class: g8rc_and_g8rc_nox0, preferred-register: '' }
857 - { id: 3, class: gprc, preferred-register: '' }
858 - { id: 4, class: g8rc, preferred-register: '' }
859 - { id: 5, class: crrc, preferred-register: '' }
860 - { id: 6, class: g8rc, preferred-register: '' }
862 - { reg: '$x3', virtual-reg: '%0' }
863 - { reg: '$x4', virtual-reg: '%1' }
865 isFrameAddressTaken: false
866 isReturnAddressTaken: false
875 maxCallFrameSize: 4294967295
876 hasOpaqueSPAdjustment: false
878 hasMustTailInVarArgFunc: false
890 %2 = RLDICL %1, 0, 58
892 %4 = RLDCLo %0, killed %3, 0, implicit-def $cr0
893 ; CHECK: RLDICLo %0, 27, 0, implicit-def $cr0
894 ; CHECK-LATE: rldicl. 5, 3, 27, 0
895 %5 = COPY killed $cr0
896 %6 = ISEL8 %2, %0, %5.sub_eq
898 BLR8 implicit $lr8, implicit $rm, implicit $x3
903 # CHECK-ALL: name: testRLDCR
905 exposesReturnsTwice: false
907 regBankSelected: false
909 tracksRegLiveness: true
911 - { id: 0, class: g8rc, preferred-register: '' }
912 - { id: 1, class: g8rc, preferred-register: '' }
913 - { id: 2, class: gprc, preferred-register: '' }
914 - { id: 3, class: gprc, preferred-register: '' }
915 - { id: 4, class: g8rc, preferred-register: '' }
917 - { reg: '$x3', virtual-reg: '%0' }
918 - { reg: '$x4', virtual-reg: '%1' }
920 isFrameAddressTaken: false
921 isReturnAddressTaken: false
930 maxCallFrameSize: 4294967295
931 hasOpaqueSPAdjustment: false
933 hasMustTailInVarArgFunc: false
947 %4 = RLDCR %0, killed %3, 0
948 ; CHECK: RLDICR %0, 44, 0
949 ; CHECK-LATE: rldicr 3, 3, 44, 0
951 BLR8 implicit $lr8, implicit $rm, implicit $x3
956 # CHECK-ALL: name: testRLDCRo
958 exposesReturnsTwice: false
960 regBankSelected: false
962 tracksRegLiveness: true
964 - { id: 0, class: g8rc_and_g8rc_nox0, preferred-register: '' }
965 - { id: 1, class: g8rc, preferred-register: '' }
966 - { id: 2, class: g8rc_and_g8rc_nox0, preferred-register: '' }
967 - { id: 3, class: gprc, preferred-register: '' }
968 - { id: 4, class: g8rc, preferred-register: '' }
969 - { id: 5, class: crrc, preferred-register: '' }
970 - { id: 6, class: g8rc, preferred-register: '' }
972 - { reg: '$x3', virtual-reg: '%0' }
973 - { reg: '$x4', virtual-reg: '%1' }
975 isFrameAddressTaken: false
976 isReturnAddressTaken: false
985 maxCallFrameSize: 4294967295
986 hasOpaqueSPAdjustment: false
988 hasMustTailInVarArgFunc: false
1000 %2 = RLDICL %1, 0, 58
1002 %4 = RLDCRo %0, killed %3, 0, implicit-def $cr0
1003 ; CHECK: RLDICRo %0, 46, 0, implicit-def $cr0
1004 ; CHECK-LATE: rldicr. 5, 3, 46, 0
1005 %5 = COPY killed $cr0
1006 %6 = ISEL8 %2, %0, %5.sub_eq
1008 BLR8 implicit $lr8, implicit $rm, implicit $x3
1013 # CHECK-ALL: name: testSLD
1015 exposesReturnsTwice: false
1017 regBankSelected: false
1019 tracksRegLiveness: true
1021 - { id: 0, class: g8rc, preferred-register: '' }
1022 - { id: 1, class: g8rc, preferred-register: '' }
1023 - { id: 2, class: gprc, preferred-register: '' }
1024 - { id: 3, class: g8rc, preferred-register: '' }
1026 - { reg: '$x3', virtual-reg: '%0' }
1027 - { reg: '$x4', virtual-reg: '%1' }
1029 isFrameAddressTaken: false
1030 isReturnAddressTaken: false
1032 hasPatchPoint: false
1039 maxCallFrameSize: 4294967295
1040 hasOpaqueSPAdjustment: false
1042 hasMustTailInVarArgFunc: false
1055 %3 = SLD %0, killed %2
1057 ; CHECK-LATE: li 3, 0
1059 BLR8 implicit $lr8, implicit $rm, implicit $x3
1064 # CHECK-ALL: name: testSLDo
1066 exposesReturnsTwice: false
1068 regBankSelected: false
1070 tracksRegLiveness: true
1072 - { id: 0, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1073 - { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1074 - { id: 2, class: gprc, preferred-register: '' }
1075 - { id: 3, class: g8rc, preferred-register: '' }
1076 - { id: 4, class: crrc, preferred-register: '' }
1077 - { id: 5, class: g8rc, preferred-register: '' }
1079 - { reg: '$x3', virtual-reg: '%0' }
1080 - { reg: '$x4', virtual-reg: '%1' }
1082 isFrameAddressTaken: false
1083 isReturnAddressTaken: false
1085 hasPatchPoint: false
1092 maxCallFrameSize: 4294967295
1093 hasOpaqueSPAdjustment: false
1095 hasMustTailInVarArgFunc: false
1108 %3 = SLDo %0, killed %2, implicit-def $cr0
1109 ; CHECK: ANDIo8 %0, 0, implicit-def $cr0
1110 ; CHECK-LATE: andi. 5, 3, 0
1111 %4 = COPY killed $cr0
1112 %5 = ISEL8 %1, %0, %4.sub_eq
1114 BLR8 implicit $lr8, implicit $rm, implicit $x3
1119 # CHECK-ALL: name: testSRD
1121 exposesReturnsTwice: false
1123 regBankSelected: false
1125 tracksRegLiveness: true
1127 - { id: 0, class: g8rc, preferred-register: '' }
1128 - { id: 1, class: g8rc, preferred-register: '' }
1129 - { id: 2, class: gprc, preferred-register: '' }
1130 - { id: 3, class: g8rc, preferred-register: '' }
1132 - { reg: '$x3', virtual-reg: '%0' }
1133 - { reg: '$x4', virtual-reg: '%1' }
1135 isFrameAddressTaken: false
1136 isReturnAddressTaken: false
1138 hasPatchPoint: false
1145 maxCallFrameSize: 4294967295
1146 hasOpaqueSPAdjustment: false
1148 hasMustTailInVarArgFunc: false
1161 %3 = SRD %0, killed %2
1162 ; CHECK: RLDICL %0, 48, 16
1163 ; CHECK-LATE: rldicl 3, 3, 48, 16
1165 BLR8 implicit $lr8, implicit $rm, implicit $x3
1170 # CHECK-ALL: name: testSRDo
1172 exposesReturnsTwice: false
1174 regBankSelected: false
1176 tracksRegLiveness: true
1178 - { id: 0, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1179 - { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1180 - { id: 2, class: gprc, preferred-register: '' }
1181 - { id: 3, class: g8rc, preferred-register: '' }
1182 - { id: 4, class: crrc, preferred-register: '' }
1183 - { id: 5, class: g8rc, preferred-register: '' }
1185 - { reg: '$x3', virtual-reg: '%0' }
1186 - { reg: '$x4', virtual-reg: '%1' }
1188 isFrameAddressTaken: false
1189 isReturnAddressTaken: false
1191 hasPatchPoint: false
1198 maxCallFrameSize: 4294967295
1199 hasOpaqueSPAdjustment: false
1201 hasMustTailInVarArgFunc: false
1214 %3 = SRDo %0, killed %2, implicit-def $cr0
1215 ; CHECK: ANDIo8 %0, 0, implicit-def $cr0
1216 ; CHECK-LATE: andi. 5, 3, 0
1217 %4 = COPY killed $cr0
1218 %5 = ISEL8 %1, %0, %4.sub_eq
1220 BLR8 implicit $lr8, implicit $rm, implicit $x3
1225 # CHECK-ALL: name: testSRAD
1227 exposesReturnsTwice: false
1229 regBankSelected: false
1231 tracksRegLiveness: true
1233 - { id: 0, class: g8rc, preferred-register: '' }
1234 - { id: 1, class: g8rc, preferred-register: '' }
1235 - { id: 2, class: gprc, preferred-register: '' }
1236 - { id: 3, class: g8rc, preferred-register: '' }
1238 - { reg: '$x3', virtual-reg: '%0' }
1239 - { reg: '$x4', virtual-reg: '%1' }
1241 isFrameAddressTaken: false
1242 isReturnAddressTaken: false
1244 hasPatchPoint: false
1251 maxCallFrameSize: 4294967295
1252 hasOpaqueSPAdjustment: false
1254 hasMustTailInVarArgFunc: false
1267 %3 = SRAD %0, killed %2, implicit-def dead $carry
1268 ; CHECK: SRAD %0, killed %2, implicit-def dead $carry
1269 ; CHECK-LATE: srad 3, 3, 4
1271 BLR8 implicit $lr8, implicit $rm, implicit $x3
1276 # CHECK-ALL: name: testSRADo
1278 exposesReturnsTwice: false
1280 regBankSelected: false
1282 tracksRegLiveness: true
1284 - { id: 0, class: g8rc, preferred-register: '' }
1285 - { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1286 - { id: 2, class: gprc, preferred-register: '' }
1287 - { id: 3, class: g8rc_and_g8rc_nox0, preferred-register: '' }
1288 - { id: 4, class: crrc, preferred-register: '' }
1289 - { id: 5, class: g8rc, preferred-register: '' }
1291 - { reg: '$x3', virtual-reg: '%0' }
1292 - { reg: '$x4', virtual-reg: '%1' }
1294 isFrameAddressTaken: false
1295 isReturnAddressTaken: false
1297 hasPatchPoint: false
1304 maxCallFrameSize: 4294967295
1305 hasOpaqueSPAdjustment: false
1307 hasMustTailInVarArgFunc: false
1320 %3 = SRADo %0, killed %2, implicit-def dead $carry, implicit-def $cr0
1321 ; CHECK: SRADo %0, killed %2, implicit-def dead $carry, implicit-def $cr0
1322 ; CHECK-LATE: srad. 3, 3, 5
1323 %4 = COPY killed $cr0
1324 %5 = ISEL8 %1, %3, %4.sub_eq
1326 BLR8 implicit $lr8, implicit $rm, implicit $x3