1330 lines · plain
1# RUN: llc -run-pass ppc-mi-peepholes -ppc-convert-rr-to-ri %s -o - | FileCheck %s2# RUN: llc -start-after ppc-mi-peepholes -ppc-late-peephole %s -o - | FileCheck %s --check-prefix=CHECK-LATE3 4--- |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"9 10 ; Function Attrs: norecurse nounwind readnone11 define zeroext i32 @testRLWNM(i32 zeroext %a) local_unnamed_addr #0 {12 entry:13 %shl = shl i32 %a, 414 %and = and i32 %shl, 408015 ret i32 %and16 }17 18 ; Function Attrs: norecurse nounwind readnone19 define i64 @testRLWNM8(i64 %a) local_unnamed_addr #0 {20 entry:21 %shl = shl i64 %a, 422 %and = and i64 %shl, 408023 ret i64 %and24 }25 26 ; Function Attrs: norecurse nounwind readnone27 define zeroext i32 @testRLWNM_rec(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {28 entry:29 %and = and i32 %a, 25530 %tobool = icmp eq i32 %and, 031 %cond = select i1 %tobool, i32 %b, i32 %a32 ret i32 %cond33 }34 35 ; Function Attrs: norecurse nounwind readnone36 define i64 @testRLWNM8_rec(i64 %a, i64 %b) local_unnamed_addr #0 {37 entry:38 %a.tr = trunc i64 %a to i3239 %0 = shl i32 %a.tr, 440 %conv = and i32 %0, 408041 %tobool = icmp eq i32 %conv, 042 %conv1 = zext i32 %conv to i6443 %cond = select i1 %tobool, i64 %b, i64 %conv144 ret i64 %cond45 }46 47 ; Function Attrs: norecurse nounwind readnone48 define zeroext i32 @testSLW(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {49 entry:50 %shl = shl i32 %a, %b51 ret i32 %shl52 }53 54 ; Function Attrs: norecurse nounwind readnone55 define zeroext i32 @testSLW_rec(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {56 entry:57 %shl = shl i32 %a, %b58 %tobool = icmp eq i32 %shl, 059 %cond = select i1 %tobool, i32 %b, i32 %a60 ret i32 %cond61 }62 63 ; Function Attrs: norecurse nounwind readnone64 define zeroext i32 @testSRW(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {65 entry:66 %shr = lshr i32 %a, %b67 ret i32 %shr68 }69 70 ; Function Attrs: norecurse nounwind readnone71 define zeroext i32 @testSRW_rec(i32 zeroext %a, i32 zeroext %b) local_unnamed_addr #0 {72 entry:73 %shr = lshr i32 %a, %b74 %tobool = icmp eq i32 %shr, 075 %cond = select i1 %tobool, i32 %b, i32 %a76 ret i32 %cond77 }78 79 ; Function Attrs: norecurse nounwind readnone80 define signext i32 @testSRAW(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {81 entry:82 %shr = ashr i32 %a, %b83 ret i32 %shr84 }85 86 ; Function Attrs: norecurse nounwind readnone87 define signext i32 @testSRAW_rec(i32 signext %a, i32 signext %b) local_unnamed_addr #0 {88 entry:89 %shr = ashr i32 %a, %b90 %tobool = icmp eq i32 %shr, 091 %cond = select i1 %tobool, i32 %b, i32 %shr92 ret i32 %cond93 }94 95 ; Function Attrs: norecurse nounwind readnone96 define i64 @testRLDCL(i64 %a, i64 %b) local_unnamed_addr #0 {97 entry:98 %and = and i64 %b, 6399 %shl = shl i64 %a, %and100 %sub = sub nsw i64 64, %and101 %shr = lshr i64 %a, %sub102 %or = or i64 %shr, %shl103 ret i64 %or104 }105 106 ; Function Attrs: norecurse nounwind readnone107 define i64 @testRLDCL_rec(i64 %a, i64 %b) local_unnamed_addr #0 {108 entry:109 %and = and i64 %b, 63110 %shl = shl i64 %a, %and111 %sub = sub nsw i64 64, %and112 %shr = lshr i64 %a, %sub113 %or = or i64 %shr, %shl114 %tobool = icmp eq i64 %or, 0115 %cond = select i1 %tobool, i64 %and, i64 %a116 ret i64 %cond117 }118 119 ; Function Attrs: norecurse nounwind readnone120 define i64 @testRLDCR(i64 %a, i64 %b) local_unnamed_addr #0 {121 entry:122 %and = and i64 %b, 63123 %shl = shl i64 %a, %and124 %sub = sub nsw i64 64, %and125 %shr = lshr i64 %a, %sub126 %or = or i64 %shr, %shl127 ret i64 %or128 }129 130 ; Function Attrs: norecurse nounwind readnone131 define i64 @testRLDCR_rec(i64 %a, i64 %b) local_unnamed_addr #0 {132 entry:133 %and = and i64 %b, 63134 %shl = shl i64 %a, %and135 %sub = sub nsw i64 64, %and136 %shr = lshr i64 %a, %sub137 %or = or i64 %shr, %shl138 %tobool = icmp eq i64 %or, 0139 %cond = select i1 %tobool, i64 %and, i64 %a140 ret i64 %cond141 }142 143 define i64 @testSLD(i64 %a, i64 %b) local_unnamed_addr #0 {144 entry:145 %shl = shl i64 %a, %b146 ret i64 %shl147 }148 149 ; Function Attrs: norecurse nounwind readnone150 define i64 @testSLD_rec(i64 %a, i64 %b) local_unnamed_addr #0 {151 entry:152 %shl = shl i64 %a, %b153 %tobool = icmp eq i64 %shl, 0154 %cond = select i1 %tobool, i64 %b, i64 %a155 ret i64 %cond156 }157 158 ; Function Attrs: norecurse nounwind readnone159 define i64 @testSRD(i64 %a, i64 %b) local_unnamed_addr #0 {160 entry:161 %shr = lshr i64 %a, %b162 ret i64 %shr163 }164 165 ; Function Attrs: norecurse nounwind readnone166 define i64 @testSRD_rec(i64 %a, i64 %b) local_unnamed_addr #0 {167 entry:168 %shr = lshr i64 %a, %b169 %tobool = icmp eq i64 %shr, 0170 %cond = select i1 %tobool, i64 %b, i64 %a171 ret i64 %cond172 }173 174 ; Function Attrs: norecurse nounwind readnone175 define i64 @testSRAD(i64 %a, i64 %b) local_unnamed_addr #0 {176 entry:177 %shr = ashr i64 %a, %b178 ret i64 %shr179 }180 181 ; Function Attrs: norecurse nounwind readnone182 define i64 @testSRAD_rec(i64 %a, i64 %b) local_unnamed_addr #0 {183 entry:184 %shr = ashr i64 %a, %b185 %tobool = icmp eq i64 %shr, 0186 %cond = select i1 %tobool, i64 %b, i64 %shr187 ret i64 %cond188 }189 190 attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="none" "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" "use-soft-float"="false" }191 192 !llvm.module.flags = !{!0, !1}193 !llvm.ident = !{!2}194 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}211 212...213---214name: testRLWNM215# CHECK-ALL: name: testRLWNM216alignment: 16217exposesReturnsTwice: false218legalized: false219regBankSelected: false220selected: false221tracksRegLiveness: true222registers: 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: '' }228liveins: 229 - { reg: '$x3', virtual-reg: '%0' }230frameInfo: 231 isFrameAddressTaken: false232 isReturnAddressTaken: false233 hasStackMap: false234 hasPatchPoint: false235 stackSize: 0236 offsetAdjustment: 0237 maxAlignment: 0238 adjustsStack: false239 hasCalls: false240 stackProtector: ''241 maxCallFrameSize: 4294967295242 hasOpaqueSPAdjustment: false243 hasVAStart: false244 hasMustTailInVarArgFunc: false245 savePoint: []246 restorePoint: []247fixedStack: 248stack: 249constants: 250body: |251 bb.0.entry:252 liveins: $x3253 254 %0 = COPY $x3255 %1 = COPY %0.sub_32256 %3 = IMPLICIT_DEF257 %2 = LI 170258 %4 = RLWNM killed %1, %2, 20, 27259 ; CHECK: RLWINM killed %1, 10, 20, 27260 ; CHECK-LATE: rlwinm 3, 3, 10, 20, 27261 $x3 = EXTSW_32_64 %4262 BLR8 implicit $lr8, implicit $rm, implicit $x3263 264...265---266name: testRLWNM8267# CHECK-ALL: name: testRLWNM8268alignment: 16269exposesReturnsTwice: false270legalized: false271regBankSelected: false272selected: false273tracksRegLiveness: true274registers: 275 - { id: 0, class: g8rc, preferred-register: '' }276 - { id: 1, class: g8rc, preferred-register: '' }277 - { id: 2, class: g8rc, preferred-register: '' }278liveins: 279 - { reg: '$x3', virtual-reg: '%0' }280frameInfo: 281 isFrameAddressTaken: false282 isReturnAddressTaken: false283 hasStackMap: false284 hasPatchPoint: false285 stackSize: 0286 offsetAdjustment: 0287 maxAlignment: 0288 adjustsStack: false289 hasCalls: false290 stackProtector: ''291 maxCallFrameSize: 4294967295292 hasOpaqueSPAdjustment: false293 hasVAStart: false294 hasMustTailInVarArgFunc: false295 savePoint: []296 restorePoint: []297fixedStack: 298stack: 299constants: 300body: |301 bb.0.entry:302 liveins: $x3303 304 %0 = LI8 234305 %1 = COPY $x3306 %2 = RLWNM8 %1, %0, 20, 27307 ; CHECK: RLWINM8 killed %1, 10, 20, 27308 ; CHECK-LATE: rlwinm 3, 3, 10, 20, 27309 $x3 = COPY %2310 BLR8 implicit $lr8, implicit $rm, implicit $x3311 312...313---314name: testRLWNM_rec315# CHECK-ALL: name: testRLWNM_rec316alignment: 16317exposesReturnsTwice: false318legalized: false319regBankSelected: false320selected: false321tracksRegLiveness: true322registers: 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: '' }333liveins: 334 - { reg: '$x3', virtual-reg: '%0' }335 - { reg: '$x4', virtual-reg: '%1' }336frameInfo: 337 isFrameAddressTaken: false338 isReturnAddressTaken: false339 hasStackMap: false340 hasPatchPoint: false341 stackSize: 0342 offsetAdjustment: 0343 maxAlignment: 0344 adjustsStack: false345 hasCalls: false346 stackProtector: ''347 maxCallFrameSize: 4294967295348 hasOpaqueSPAdjustment: false349 hasVAStart: false350 hasMustTailInVarArgFunc: false351 savePoint: []352 restorePoint: []353fixedStack: 354stack: 355constants: 356body: |357 bb.0.entry:358 liveins: $x3, $x4359 360 %1 = COPY $x4361 %0 = COPY $x3362 %2 = COPY %1.sub_32363 %3 = LI -22364 %4 = RLWNM_rec %2, %3, 24, 31, implicit-def $cr0365 ; CHECK: RLWINM_rec %2, 10, 24, 31, implicit-def $cr0366 ; CHECK-LATE: li 3, -22367 ; CHECK-LATE: rlwinm. 5, 4, 10, 24, 31368 %5 = COPY killed $cr0369 %6 = ISEL %2, %3, %5.sub_eq370 %8 = IMPLICIT_DEF371 %7 = INSERT_SUBREG %8, killed %6, 1372 %9 = RLDICL killed %7, 0, 32373 $x3 = COPY %9374 BLR8 implicit $lr8, implicit $rm, implicit $x3375 376...377---378name: testRLWNM8_rec379# CHECK-ALL: name: testRLWNM8_rec380alignment: 16381exposesReturnsTwice: false382legalized: false383regBankSelected: false384selected: false385tracksRegLiveness: true386registers: 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: '' }396liveins: 397 - { reg: '$x3', virtual-reg: '%0' }398 - { reg: '$x4', virtual-reg: '%1' }399frameInfo: 400 isFrameAddressTaken: false401 isReturnAddressTaken: false402 hasStackMap: false403 hasPatchPoint: false404 stackSize: 0405 offsetAdjustment: 0406 maxAlignment: 0407 adjustsStack: false408 hasCalls: false409 stackProtector: ''410 maxCallFrameSize: 4294967295411 hasOpaqueSPAdjustment: false412 hasVAStart: false413 hasMustTailInVarArgFunc: false414 savePoint: []415 restorePoint: []416fixedStack: 417stack: 418constants: 419body: |420 bb.0.entry:421 liveins: $x3, $x4422 423 %1 = COPY $x4424 %0 = COPY $x3425 %2 = LI8 -18426 %3 = RLWNM8_rec %1, %2, 20, 27, implicit-def $cr0427 ; CHECK: RLWINM8_rec %1, 14, 20, 27, implicit-def $cr0428 ; CHECK-LATE: rlwinm. 3, 4, 14, 20, 27429 %7 = COPY killed $cr0430 %6 = RLDICL killed %3, 0, 32431 %8 = ISEL8 %1, %6, %7.sub_eq432 $x3 = COPY %8433 BLR8 implicit $lr8, implicit $rm, implicit $x3434 435...436---437name: testSLW438# CHECK-ALL: name: testSLW439alignment: 16440exposesReturnsTwice: false441legalized: false442regBankSelected: false443selected: false444tracksRegLiveness: true445registers: 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: '' }455liveins: 456 - { reg: '$x3', virtual-reg: '%0' }457 - { reg: '$x4', virtual-reg: '%1' }458frameInfo: 459 isFrameAddressTaken: false460 isReturnAddressTaken: false461 hasStackMap: false462 hasPatchPoint: false463 stackSize: 0464 offsetAdjustment: 0465 maxAlignment: 0466 adjustsStack: false467 hasCalls: false468 stackProtector: ''469 maxCallFrameSize: 4294967295470 hasOpaqueSPAdjustment: false471 hasVAStart: false472 hasMustTailInVarArgFunc: false473 savePoint: []474 restorePoint: []475fixedStack: 476stack: 477constants: 478body: |479 bb.0.entry:480 liveins: $x3, $x4481 482 %1 = COPY $x4483 %0 = COPY $x3484 %2 = COPY %1.sub_32485 %5 = LI 210486 %8 = SLW killed %2, killed %5487 ; CHECK: RLWINM killed %2, 18, 0, 13488 ; CHECK-LATE: slwi 3, 4, 18489 $x3 = EXTSW_32_64 %8490 BLR8 implicit $lr8, implicit $rm, implicit $x3491 492...493---494name: testSLW_rec495# CHECK-ALL: name: testSLW_rec496alignment: 16497exposesReturnsTwice: false498legalized: false499regBankSelected: false500selected: false501tracksRegLiveness: true502registers: 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: '' }513liveins: 514 - { reg: '$x3', virtual-reg: '%0' }515 - { reg: '$x4', virtual-reg: '%1' }516frameInfo: 517 isFrameAddressTaken: false518 isReturnAddressTaken: false519 hasStackMap: false520 hasPatchPoint: false521 stackSize: 0522 offsetAdjustment: 0523 maxAlignment: 0524 adjustsStack: false525 hasCalls: false526 stackProtector: ''527 maxCallFrameSize: 4294967295528 hasOpaqueSPAdjustment: false529 hasVAStart: false530 hasMustTailInVarArgFunc: false531 savePoint: []532 restorePoint: []533fixedStack: 534stack: 535constants: 536body: |537 bb.0.entry:538 liveins: $x3, $x4539 540 %1 = COPY $x4541 %0 = COPY $x3542 %2 = LI 35543 %3 = COPY %0.sub_32544 %4 = SLW_rec %3, %2, implicit-def $cr0545 ; CHECK: ANDI_rec %3, 0, implicit-def $cr0546 ; CHECK-LATE: andi. 5, 3, 0547 %5 = COPY killed $cr0548 %6 = ISEL %2, %3, %5.sub_eq549 %8 = IMPLICIT_DEF550 %7 = INSERT_SUBREG %8, killed %6, 1551 %9 = RLDICL killed %7, 0, 32552 $x3 = COPY %9553 BLR8 implicit $lr8, implicit $rm, implicit $x3554 555...556---557name: testSRW558# CHECK-ALL: name: testSRW559alignment: 16560exposesReturnsTwice: false561legalized: false562regBankSelected: false563selected: false564tracksRegLiveness: true565registers: 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: '' }575liveins: 576 - { reg: '$x3', virtual-reg: '%0' }577 - { reg: '$x4', virtual-reg: '%1' }578frameInfo: 579 isFrameAddressTaken: false580 isReturnAddressTaken: false581 hasStackMap: false582 hasPatchPoint: false583 stackSize: 0584 offsetAdjustment: 0585 maxAlignment: 0586 adjustsStack: false587 hasCalls: false588 stackProtector: ''589 maxCallFrameSize: 4294967295590 hasOpaqueSPAdjustment: false591 hasVAStart: false592 hasMustTailInVarArgFunc: false593 savePoint: []594 restorePoint: []595fixedStack: 596stack: 597constants: 598body: |599 bb.0.entry:600 liveins: $x3, $x4601 602 %1 = COPY $x4603 %0 = COPY $x3604 %2 = LI 48605 %5 = COPY %0.sub_32606 %8 = SRW killed %5, killed %2607 ; CHECK: LI8 0608 ; CHECK-LATE: li 3, 0609 $x3 = EXTSW_32_64 %8610 BLR8 implicit $lr8, implicit $rm, implicit $x3611 612...613---614name: testSRW_rec615# CHECK-ALL: name: testSRW_rec616alignment: 16617exposesReturnsTwice: false618legalized: false619regBankSelected: false620selected: false621tracksRegLiveness: true622registers: 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: '' }633liveins: 634 - { reg: '$x3', virtual-reg: '%0' }635 - { reg: '$x4', virtual-reg: '%1' }636frameInfo: 637 isFrameAddressTaken: false638 isReturnAddressTaken: false639 hasStackMap: false640 hasPatchPoint: false641 stackSize: 0642 offsetAdjustment: 0643 maxAlignment: 0644 adjustsStack: false645 hasCalls: false646 stackProtector: ''647 maxCallFrameSize: 4294967295648 hasOpaqueSPAdjustment: false649 hasVAStart: false650 hasMustTailInVarArgFunc: false651 savePoint: []652 restorePoint: []653fixedStack: 654stack: 655constants: 656body: |657 bb.0.entry:658 liveins: $x3, $x4659 660 %1 = COPY $x4661 %0 = COPY $x3662 %2 = LI -7663 %3 = COPY %0.sub_32664 %4 = SRW_rec %3, %2, implicit-def $cr0665 ; CHECK: ANDI_rec %3, 0, implicit-def $cr0666 ; CHECK-LATE: andi. 5, 3, 0667 %5 = COPY killed $cr0668 %6 = ISEL %2, %3, %5.sub_eq669 %8 = IMPLICIT_DEF670 %7 = INSERT_SUBREG %8, killed %6, 1671 %9 = RLDICL killed %7, 0, 32672 $x3 = COPY %9673 BLR8 implicit $lr8, implicit $rm, implicit $x3674 675...676---677name: testSRAW678# CHECK-ALL: name: testSRAW679alignment: 16680exposesReturnsTwice: false681legalized: false682regBankSelected: false683selected: false684tracksRegLiveness: true685registers: 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: '' }692liveins: 693 - { reg: '$x3', virtual-reg: '%0' }694 - { reg: '$x4', virtual-reg: '%1' }695frameInfo: 696 isFrameAddressTaken: false697 isReturnAddressTaken: false698 hasStackMap: false699 hasPatchPoint: false700 stackSize: 0701 offsetAdjustment: 0702 maxAlignment: 0703 adjustsStack: false704 hasCalls: false705 stackProtector: ''706 maxCallFrameSize: 4294967295707 hasOpaqueSPAdjustment: false708 hasVAStart: false709 hasMustTailInVarArgFunc: false710 savePoint: []711 restorePoint: []712fixedStack: 713stack: 714constants: 715body: |716 bb.0.entry:717 liveins: $x3, $x4718 719 %1 = COPY $x4720 %0 = COPY $x3721 %2 = LI 48722 %3 = COPY %0.sub_32723 %4 = SRAW killed %3, killed %2, implicit-def dead $carry724 ; CHECK: LI 48725 ; CHECK: SRAW8 killed %7, killed %9, implicit-def $carry, implicit-def dead $carry 726 ; CHECK-LATE: sraw 3, 3, 4727 %5 = EXTSW_32_64 killed %4728 $x3 = COPY %5729 BLR8 implicit $lr8, implicit $rm, implicit $x3730 731...732---733name: testSRAW_rec734# CHECK-ALL: name: testSRAW_rec735alignment: 16736exposesReturnsTwice: false737legalized: false738regBankSelected: false739selected: false740tracksRegLiveness: true741registers: 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: '' }750liveins: 751 - { reg: '$x3', virtual-reg: '%0' }752 - { reg: '$x4', virtual-reg: '%1' }753frameInfo: 754 isFrameAddressTaken: false755 isReturnAddressTaken: false756 hasStackMap: false757 hasPatchPoint: false758 stackSize: 0759 offsetAdjustment: 0760 maxAlignment: 0761 adjustsStack: false762 hasCalls: false763 stackProtector: ''764 maxCallFrameSize: 4294967295765 hasOpaqueSPAdjustment: false766 hasVAStart: false767 hasMustTailInVarArgFunc: false768 savePoint: []769 restorePoint: []770fixedStack: 771stack: 772constants: 773body: |774 bb.0.entry:775 liveins: $x3, $x4776 777 %1 = COPY $x4778 %0 = COPY $x3779 %2 = LI 80780 %3 = COPY %0.sub_32781 %4 = SRAW_rec killed %3, %2, implicit-def dead $carry, implicit-def $cr0782 ; CHECK: SRAW8_rec killed %10, killed %12, implicit-def $carry, implicit-def $cr0, implicit-def dead $carry, implicit-def $cr0783 ; CHECK-LATE: sraw. 3, 3, 4784 %5 = COPY killed $cr0785 %6 = ISEL %2, %4, %5.sub_eq786 %7 = EXTSW_32_64 killed %6787 $x3 = COPY %7788 BLR8 implicit $lr8, implicit $rm, implicit $x3789 790...791---792name: testRLDCL793# CHECK-ALL: name: testRLDCL794alignment: 16795exposesReturnsTwice: false796legalized: false797regBankSelected: false798selected: false799tracksRegLiveness: true800registers: 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: '' }806liveins: 807 - { reg: '$x3', virtual-reg: '%0' }808 - { reg: '$x4', virtual-reg: '%1' }809frameInfo: 810 isFrameAddressTaken: false811 isReturnAddressTaken: false812 hasStackMap: false813 hasPatchPoint: false814 stackSize: 0815 offsetAdjustment: 0816 maxAlignment: 0817 adjustsStack: false818 hasCalls: false819 stackProtector: ''820 maxCallFrameSize: 4294967295821 hasOpaqueSPAdjustment: false822 hasVAStart: false823 hasMustTailInVarArgFunc: false824 savePoint: []825 restorePoint: []826fixedStack: 827stack: 828constants: 829body: |830 bb.0.entry:831 liveins: $x3, $x4832 833 %1 = COPY $x4834 %0 = COPY $x3835 %2 = COPY %1.sub_32836 %3 = LI 140837 %4 = RLDCL %0, killed %3, 0838 ; CHECK: RLDICL killed %0, 12, 0839 ; CHECK-LATE: rotldi 3, 3, 12840 $x3 = COPY %4841 BLR8 implicit $lr8, implicit $rm, implicit $x3842 843...844---845name: testRLDCL_rec846# CHECK-ALL: name: testRLDCL_rec847alignment: 16848exposesReturnsTwice: false849legalized: false850regBankSelected: false851selected: false852tracksRegLiveness: true853registers: 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: '' }861liveins: 862 - { reg: '$x3', virtual-reg: '%0' }863 - { reg: '$x4', virtual-reg: '%1' }864frameInfo: 865 isFrameAddressTaken: false866 isReturnAddressTaken: false867 hasStackMap: false868 hasPatchPoint: false869 stackSize: 0870 offsetAdjustment: 0871 maxAlignment: 0872 adjustsStack: false873 hasCalls: false874 stackProtector: ''875 maxCallFrameSize: 4294967295876 hasOpaqueSPAdjustment: false877 hasVAStart: false878 hasMustTailInVarArgFunc: false879 savePoint: []880 restorePoint: []881fixedStack: 882stack: 883constants: 884body: |885 bb.0.entry:886 liveins: $x3, $x4887 888 %1 = COPY $x4889 %0 = COPY $x3890 %2 = RLDICL %1, 0, 58891 %3 = LI -37892 %4 = RLDCL_rec %0, killed %3, 0, implicit-def $cr0893 ; CHECK: RLDICL_rec %0, 27, 0, implicit-def $cr0894 ; CHECK-LATE: rotldi. 5, 3, 27895 %5 = COPY killed $cr0896 %6 = ISEL8 %2, %0, %5.sub_eq897 $x3 = COPY %6898 BLR8 implicit $lr8, implicit $rm, implicit $x3899 900...901---902name: testRLDCR903# CHECK-ALL: name: testRLDCR904alignment: 16905exposesReturnsTwice: false906legalized: false907regBankSelected: false908selected: false909tracksRegLiveness: true910registers: 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: '' }916liveins: 917 - { reg: '$x3', virtual-reg: '%0' }918 - { reg: '$x4', virtual-reg: '%1' }919frameInfo: 920 isFrameAddressTaken: false921 isReturnAddressTaken: false922 hasStackMap: false923 hasPatchPoint: false924 stackSize: 0925 offsetAdjustment: 0926 maxAlignment: 0927 adjustsStack: false928 hasCalls: false929 stackProtector: ''930 maxCallFrameSize: 4294967295931 hasOpaqueSPAdjustment: false932 hasVAStart: false933 hasMustTailInVarArgFunc: false934 savePoint: []935 restorePoint: []936fixedStack: 937stack: 938constants: 939body: |940 bb.0.entry:941 liveins: $x3, $x4942 943 %1 = COPY $x4944 %0 = COPY $x3945 %2 = COPY %1.sub_32946 %3 = LI 300947 %4 = RLDCR %0, killed %3, 0948 ; CHECK: RLDICR killed %0, 44, 0949 ; CHECK-LATE: rldicr 3, 3, 44, 0950 $x3 = COPY %4951 BLR8 implicit $lr8, implicit $rm, implicit $x3952 953...954---955name: testRLDCR_rec956# CHECK-ALL: name: testRLDCR_rec957alignment: 16958exposesReturnsTwice: false959legalized: false960regBankSelected: false961selected: false962tracksRegLiveness: true963registers: 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: '' }971liveins: 972 - { reg: '$x3', virtual-reg: '%0' }973 - { reg: '$x4', virtual-reg: '%1' }974frameInfo: 975 isFrameAddressTaken: false976 isReturnAddressTaken: false977 hasStackMap: false978 hasPatchPoint: false979 stackSize: 0980 offsetAdjustment: 0981 maxAlignment: 0982 adjustsStack: false983 hasCalls: false984 stackProtector: ''985 maxCallFrameSize: 4294967295986 hasOpaqueSPAdjustment: false987 hasVAStart: false988 hasMustTailInVarArgFunc: false989 savePoint: []990 restorePoint: []991fixedStack: 992stack: 993constants: 994body: |995 bb.0.entry:996 liveins: $x3, $x4997 998 %1 = COPY $x4999 %0 = COPY $x31000 %2 = RLDICL %1, 0, 581001 %3 = LI -181002 %4 = RLDCR_rec %0, killed %3, 0, implicit-def $cr01003 ; CHECK: RLDICR_rec %0, 46, 0, implicit-def $cr01004 ; CHECK-LATE: rldicr. 5, 3, 46, 01005 %5 = COPY killed $cr01006 %6 = ISEL8 %2, %0, %5.sub_eq1007 $x3 = COPY %61008 BLR8 implicit $lr8, implicit $rm, implicit $x31009 1010...1011---1012name: testSLD1013# CHECK-ALL: name: testSLD1014alignment: 161015exposesReturnsTwice: false1016legalized: false1017regBankSelected: false1018selected: false1019tracksRegLiveness: true1020registers: 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: '' }1025liveins: 1026 - { reg: '$x3', virtual-reg: '%0' }1027 - { reg: '$x4', virtual-reg: '%1' }1028frameInfo: 1029 isFrameAddressTaken: false1030 isReturnAddressTaken: false1031 hasStackMap: false1032 hasPatchPoint: false1033 stackSize: 01034 offsetAdjustment: 01035 maxAlignment: 01036 adjustsStack: false1037 hasCalls: false1038 stackProtector: ''1039 maxCallFrameSize: 42949672951040 hasOpaqueSPAdjustment: false1041 hasVAStart: false1042 hasMustTailInVarArgFunc: false1043 savePoint: []1044 restorePoint: []1045fixedStack: 1046stack: 1047constants: 1048body: |1049 bb.0.entry:1050 liveins: $x3, $x41051 1052 %1 = COPY $x41053 %0 = COPY $x31054 %2 = LI -131055 %3 = SLD %0, killed %21056 ; CHECK: LI8 01057 ; CHECK-LATE: li 3, 01058 $x3 = COPY %31059 BLR8 implicit $lr8, implicit $rm, implicit $x31060 1061...1062---1063name: testSLD_rec1064# CHECK-ALL: name: testSLD_rec1065alignment: 161066exposesReturnsTwice: false1067legalized: false1068regBankSelected: false1069selected: false1070tracksRegLiveness: true1071registers: 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: '' }1078liveins: 1079 - { reg: '$x3', virtual-reg: '%0' }1080 - { reg: '$x4', virtual-reg: '%1' }1081frameInfo: 1082 isFrameAddressTaken: false1083 isReturnAddressTaken: false1084 hasStackMap: false1085 hasPatchPoint: false1086 stackSize: 01087 offsetAdjustment: 01088 maxAlignment: 01089 adjustsStack: false1090 hasCalls: false1091 stackProtector: ''1092 maxCallFrameSize: 42949672951093 hasOpaqueSPAdjustment: false1094 hasVAStart: false1095 hasMustTailInVarArgFunc: false1096 savePoint: []1097 restorePoint: []1098fixedStack: 1099stack: 1100constants: 1101body: |1102 bb.0.entry:1103 liveins: $x3, $x41104 1105 %1 = COPY $x41106 %0 = COPY $x31107 %2 = LI 881108 %3 = SLD_rec %0, killed %2, implicit-def $cr01109 ; CHECK: ANDI8_rec %0, 0, implicit-def $cr01110 ; CHECK-LATE: andi. 5, 3, 01111 %4 = COPY killed $cr01112 %5 = ISEL8 %1, %0, %4.sub_eq1113 $x3 = COPY %51114 BLR8 implicit $lr8, implicit $rm, implicit $x31115 1116...1117---1118name: testSRD1119# CHECK-ALL: name: testSRD1120alignment: 161121exposesReturnsTwice: false1122legalized: false1123regBankSelected: false1124selected: false1125tracksRegLiveness: true1126registers: 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: '' }1131liveins: 1132 - { reg: '$x3', virtual-reg: '%0' }1133 - { reg: '$x4', virtual-reg: '%1' }1134frameInfo: 1135 isFrameAddressTaken: false1136 isReturnAddressTaken: false1137 hasStackMap: false1138 hasPatchPoint: false1139 stackSize: 01140 offsetAdjustment: 01141 maxAlignment: 01142 adjustsStack: false1143 hasCalls: false1144 stackProtector: ''1145 maxCallFrameSize: 42949672951146 hasOpaqueSPAdjustment: false1147 hasVAStart: false1148 hasMustTailInVarArgFunc: false1149 savePoint: []1150 restorePoint: []1151fixedStack: 1152stack: 1153constants: 1154body: |1155 bb.0.entry:1156 liveins: $x3, $x41157 1158 %1 = COPY $x41159 %0 = COPY $x31160 %2 = LI 4001161 %3 = SRD %0, killed %21162 ; CHECK: RLDICL killed %0, 48, 161163 ; CHECK-LATE: rldicl 3, 3, 48, 161164 $x3 = COPY %31165 BLR8 implicit $lr8, implicit $rm, implicit $x31166 1167...1168---1169name: testSRD_rec1170# CHECK-ALL: name: testSRD_rec1171alignment: 161172exposesReturnsTwice: false1173legalized: false1174regBankSelected: false1175selected: false1176tracksRegLiveness: true1177registers: 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: '' }1184liveins: 1185 - { reg: '$x3', virtual-reg: '%0' }1186 - { reg: '$x4', virtual-reg: '%1' }1187frameInfo: 1188 isFrameAddressTaken: false1189 isReturnAddressTaken: false1190 hasStackMap: false1191 hasPatchPoint: false1192 stackSize: 01193 offsetAdjustment: 01194 maxAlignment: 01195 adjustsStack: false1196 hasCalls: false1197 stackProtector: ''1198 maxCallFrameSize: 42949672951199 hasOpaqueSPAdjustment: false1200 hasVAStart: false1201 hasMustTailInVarArgFunc: false1202 savePoint: []1203 restorePoint: []1204fixedStack: 1205stack: 1206constants: 1207body: |1208 bb.0.entry:1209 liveins: $x3, $x41210 1211 %1 = COPY $x41212 %0 = COPY $x31213 %2 = LI 641214 %3 = SRD_rec %0, killed %2, implicit-def $cr01215 ; CHECK: ANDI8_rec %0, 0, implicit-def $cr01216 ; CHECK-LATE: andi. 5, 3, 01217 %4 = COPY killed $cr01218 %5 = ISEL8 %1, %0, %4.sub_eq1219 $x3 = COPY %51220 BLR8 implicit $lr8, implicit $rm, implicit $x31221 1222...1223---1224name: testSRAD1225# CHECK-ALL: name: testSRAD1226alignment: 161227exposesReturnsTwice: false1228legalized: false1229regBankSelected: false1230selected: false1231tracksRegLiveness: true1232registers: 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: '' }1237liveins: 1238 - { reg: '$x3', virtual-reg: '%0' }1239 - { reg: '$x4', virtual-reg: '%1' }1240frameInfo: 1241 isFrameAddressTaken: false1242 isReturnAddressTaken: false1243 hasStackMap: false1244 hasPatchPoint: false1245 stackSize: 01246 offsetAdjustment: 01247 maxAlignment: 01248 adjustsStack: false1249 hasCalls: false1250 stackProtector: ''1251 maxCallFrameSize: 42949672951252 hasOpaqueSPAdjustment: false1253 hasVAStart: false1254 hasMustTailInVarArgFunc: false1255 savePoint: []1256 restorePoint: []1257fixedStack: 1258stack: 1259constants: 1260body: |1261 bb.0.entry:1262 liveins: $x3, $x41263 1264 %1 = COPY $x41265 %0 = COPY $x31266 %2 = LI -441267 %3 = SRAD %0, killed %2, implicit-def dead $carry1268 ; CHECK: SRAD killed %0, killed %2, implicit-def dead $carry1269 ; CHECK-LATE: srad 3, 3, 41270 $x3 = COPY %31271 BLR8 implicit $lr8, implicit $rm, implicit $x31272 1273...1274---1275name: testSRAD_rec1276# CHECK-ALL: name: testSRAD_rec1277alignment: 161278exposesReturnsTwice: false1279legalized: false1280regBankSelected: false1281selected: false1282tracksRegLiveness: true1283registers: 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: '' }1290liveins: 1291 - { reg: '$x3', virtual-reg: '%0' }1292 - { reg: '$x4', virtual-reg: '%1' }1293frameInfo: 1294 isFrameAddressTaken: false1295 isReturnAddressTaken: false1296 hasStackMap: false1297 hasPatchPoint: false1298 stackSize: 01299 offsetAdjustment: 01300 maxAlignment: 01301 adjustsStack: false1302 hasCalls: false1303 stackProtector: ''1304 maxCallFrameSize: 42949672951305 hasOpaqueSPAdjustment: false1306 hasVAStart: false1307 hasMustTailInVarArgFunc: false1308 savePoint: []1309 restorePoint: []1310fixedStack: 1311stack: 1312constants: 1313body: |1314 bb.0.entry:1315 liveins: $x3, $x41316 1317 %1 = COPY $x41318 %0 = COPY $x31319 %2 = LI 681320 %3 = SRAD_rec %0, killed %2, implicit-def dead $carry, implicit-def $cr01321 ; CHECK: SRAD_rec killed %0, killed %2, implicit-def dead $carry, implicit-def $cr01322 ; CHECK-LATE: srad. 3, 3, 51323 %4 = COPY killed $cr01324 %5 = ISEL8 %1, %3, %4.sub_eq1325 $x3 = COPY %51326 BLR8 implicit $lr8, implicit $rm, implicit $x31327 1328...1329---1330