|
561 | 561 | }
|
562 | 562 |
|
563 | 563 | ; Function Attrs: norecurse nounwind readnone
|
| 564 | + define i64 @testRLDICLo2(i64 %a, i64 %b) local_unnamed_addr #0 { |
| 565 | + entry: |
| 566 | + %shr = lshr i64 %a, 11 |
| 567 | + %and = and i64 %shr, 16777215 |
| 568 | + %tobool = icmp eq i64 %and, 0 |
| 569 | + %cond = select i1 %tobool, i64 %b, i64 %and |
| 570 | + ret i64 %cond |
| 571 | + } |
| 572 | + |
564 | 573 | define i64 @testRLDICLo3(i64 %a, i64 %b) local_unnamed_addr #0 {
|
565 | 574 | entry:
|
566 | 575 | %shr = lshr i64 %a, 11
|
|
611 | 620 | ret i32 %cond
|
612 | 621 | }
|
613 | 622 |
|
| 623 | + ; Function Attrs: norecurse nounwind readnone |
| 624 | + define zeroext i32 @testRLWINMo2(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 { |
| 625 | + entry: |
| 626 | + %and = and i32 %a, 255 |
| 627 | + %tobool = icmp eq i32 %and, 0 |
| 628 | + %cond = select i1 %tobool, i32 %b, i32 %a |
| 629 | + ret i32 %cond |
| 630 | + } |
| 631 | + |
614 | 632 | ; Function Attrs: norecurse nounwind readnone
|
615 | 633 | define i64 @testRLWINM8o(i64 %a, i64 %b) local_unnamed_addr #0 {
|
616 | 634 | entry:
|
@@ -3912,6 +3930,59 @@ body: |
|
3912 | 3930 | %x3 = COPY %4
|
3913 | 3931 | BLR8 implicit %lr8, implicit %rm, implicit %x3
|
3914 | 3932 |
|
| 3933 | +... |
| 3934 | +--- |
| 3935 | +name: testRLDICLo2 |
| 3936 | +# CHECK-ALL: name: testRLDICLo2 |
| 3937 | +alignment: 4 |
| 3938 | +exposesReturnsTwice: false |
| 3939 | +legalized: false |
| 3940 | +regBankSelected: false |
| 3941 | +selected: false |
| 3942 | +tracksRegLiveness: true |
| 3943 | +registers: |
| 3944 | + - { id: 0, class: g8rc, preferred-register: '' } |
| 3945 | + - { id: 1, class: g8rc_and_g8rc_nox0, preferred-register: '' } |
| 3946 | + - { id: 2, class: g8rc_and_g8rc_nox0, preferred-register: '' } |
| 3947 | + - { id: 3, class: crrc, preferred-register: '' } |
| 3948 | + - { id: 4, class: g8rc, preferred-register: '' } |
| 3949 | +liveins: |
| 3950 | + - { reg: '%x3', virtual-reg: '%0' } |
| 3951 | + - { reg: '%x4', virtual-reg: '%1' } |
| 3952 | +frameInfo: |
| 3953 | + isFrameAddressTaken: false |
| 3954 | + isReturnAddressTaken: false |
| 3955 | + hasStackMap: false |
| 3956 | + hasPatchPoint: false |
| 3957 | + stackSize: 0 |
| 3958 | + offsetAdjustment: 0 |
| 3959 | + maxAlignment: 0 |
| 3960 | + adjustsStack: false |
| 3961 | + hasCalls: false |
| 3962 | + stackProtector: '' |
| 3963 | + maxCallFrameSize: 4294967295 |
| 3964 | + hasOpaqueSPAdjustment: false |
| 3965 | + hasVAStart: false |
| 3966 | + hasMustTailInVarArgFunc: false |
| 3967 | + savePoint: '' |
| 3968 | + restorePoint: '' |
| 3969 | +fixedStack: |
| 3970 | +stack: |
| 3971 | +constants: |
| 3972 | +body: | |
| 3973 | + bb.0.entry: |
| 3974 | + liveins: %x3, %x4 |
| 3975 | + |
| 3976 | + %1 = COPY %x4 |
| 3977 | + %0 = LI8 200 |
| 3978 | + %2 = RLDICLo %0, 61, 3, implicit-def %cr0 |
| 3979 | + ; CHECK-NOT: ANDI |
| 3980 | + ; CHECK-LATE-NOT: andi. |
| 3981 | + %3 = COPY killed %cr0 |
| 3982 | + %4 = ISEL8 %1, %2, %3.sub_eq |
| 3983 | + %x3 = COPY %4 |
| 3984 | + BLR8 implicit %lr8, implicit %rm, implicit %x3 |
| 3985 | +
|
3915 | 3986 | ...
|
3916 | 3987 | ---
|
3917 | 3988 | name: testRLDICLo3
|
@@ -4232,6 +4303,69 @@ body: |
|
4232 | 4303 | %x3 = COPY %9
|
4233 | 4304 | BLR8 implicit %lr8, implicit %rm, implicit %x3
|
4234 | 4305 |
|
| 4306 | +... |
| 4307 | +--- |
| 4308 | +name: testRLWINMo2 |
| 4309 | +# CHECK-ALL: name: testRLWINMo2 |
| 4310 | +alignment: 4 |
| 4311 | +exposesReturnsTwice: false |
| 4312 | +legalized: false |
| 4313 | +regBankSelected: false |
| 4314 | +selected: false |
| 4315 | +tracksRegLiveness: true |
| 4316 | +registers: |
| 4317 | + - { id: 0, class: g8rc, preferred-register: '' } |
| 4318 | + - { id: 1, class: g8rc, preferred-register: '' } |
| 4319 | + - { id: 2, class: gprc_and_gprc_nor0, preferred-register: '' } |
| 4320 | + - { id: 3, class: gprc_and_gprc_nor0, preferred-register: '' } |
| 4321 | + - { id: 4, class: gprc, preferred-register: '' } |
| 4322 | + - { id: 5, class: crrc, preferred-register: '' } |
| 4323 | + - { id: 6, class: gprc, preferred-register: '' } |
| 4324 | + - { id: 7, class: g8rc, preferred-register: '' } |
| 4325 | + - { id: 8, class: g8rc, preferred-register: '' } |
| 4326 | + - { id: 9, class: g8rc, preferred-register: '' } |
| 4327 | +liveins: |
| 4328 | + - { reg: '%x3', virtual-reg: '%0' } |
| 4329 | + - { reg: '%x4', virtual-reg: '%1' } |
| 4330 | +frameInfo: |
| 4331 | + isFrameAddressTaken: false |
| 4332 | + isReturnAddressTaken: false |
| 4333 | + hasStackMap: false |
| 4334 | + hasPatchPoint: false |
| 4335 | + stackSize: 0 |
| 4336 | + offsetAdjustment: 0 |
| 4337 | + maxAlignment: 0 |
| 4338 | + adjustsStack: false |
| 4339 | + hasCalls: false |
| 4340 | + stackProtector: '' |
| 4341 | + maxCallFrameSize: 4294967295 |
| 4342 | + hasOpaqueSPAdjustment: false |
| 4343 | + hasVAStart: false |
| 4344 | + hasMustTailInVarArgFunc: false |
| 4345 | + savePoint: '' |
| 4346 | + restorePoint: '' |
| 4347 | +fixedStack: |
| 4348 | +stack: |
| 4349 | +constants: |
| 4350 | +body: | |
| 4351 | + bb.0.entry: |
| 4352 | + liveins: %x3, %x4 |
| 4353 | + |
| 4354 | + %1 = COPY %x4 |
| 4355 | + %0 = COPY %x3 |
| 4356 | + %2 = COPY %1.sub_32 |
| 4357 | + %3 = LI -22 |
| 4358 | + %4 = RLWINMo %3, 5, 24, 31, implicit-def %cr0 |
| 4359 | + ; CHECK-NOT: ANDI |
| 4360 | + ; CHECK-LATE-NOT: andi. |
| 4361 | + %5 = COPY killed %cr0 |
| 4362 | + %6 = ISEL %2, %3, %5.sub_eq |
| 4363 | + %8 = IMPLICIT_DEF |
| 4364 | + %7 = INSERT_SUBREG %8, killed %6, 1 |
| 4365 | + %9 = RLDICL killed %7, 0, 32 |
| 4366 | + %x3 = COPY %9 |
| 4367 | + BLR8 implicit %lr8, implicit %rm, implicit %x3 |
| 4368 | +
|
4235 | 4369 | ...
|
4236 | 4370 | ---
|
4237 | 4371 | name: testRLWINM8o
|
|
0 commit comments