768 lines · plain
1# RUN: llc -mtriple powerpc64le-unknown-linux-gnu -mcpu=pwr8 -x mir < %s \2# RUN: -verify-machineinstrs -start-before=ppc-mi-peepholes \3# RUN: -ppc-opt-conditional-trap | FileCheck %s4 5---6name: conditional_trap_opt_reg_implicit_def7alignment: 168tracksRegLiveness: true9body: |10 bb.0.entry:11 %0:gprc = IMPLICIT_DEF12 %1:gprc = IMPLICIT_DEF13 %2:g8rc = IMPLICIT_DEF14 %3:g8rc = IMPLICIT_DEF15 TW 8, %0, %116 TD 8, %2, %317 TWI 24, %0, 018 TDI 24, %2, 019 BLR8 implicit $lr8, implicit $rm20...21 # CHECK-LABEL: conditional_trap_opt_reg_implicit_def22 # CHECK: # %bb.0: # %entry23 # CHECK-NEXT: twgt 3, 324 # CHECK-NEXT: tdgt 3, 325 # CHECK-NEXT: twnei 3, 026 # CHECK-NEXT: tdnei 3, 027 # CHECK-NEXT: blr28 29---30name: conditional_trap_opt_int_return31alignment: 1632tracksRegLiveness: true33body: |34 bb.0.entry:35 liveins: $x336 %0:g8rc = COPY $x337 %1:g8rc = LI8 338 %2:g8rc = LI8 039 TD 24, %2, %140 $x3 = COPY %041 BLR8 implicit $lr8, implicit $rm, implicit $x342...43 # CHECK-LABEL: conditional_trap_opt_int_return44 # CHECK: # %bb.0: # %entry45 # CHECK-NEXT: trap46 # CHECK-NOT: blr47 48---49name: conditional_trap_opt_TW_3150alignment: 1651tracksRegLiveness: true52body: |53 bb.0.entry:54 %0:gprc = LI 355 %1:gprc = LI 056 TW 31, %1, %057 BLR8 implicit $lr8, implicit $rm58...59 # CHECK-LABEL: conditional_trap_opt_TW_3160 # CHECK: # %bb.0: # %entry61 # CHECK-NEXT: trap62 # CHECK-NOT: blr63 64---65name: conditional_trap_opt_TW_2466alignment: 1667tracksRegLiveness: true68body: |69 bb.0.entry:70 %0:gprc = LI 371 %1:gprc = LI 072 TW 24, %1, %073 BLR8 implicit $lr8, implicit $rm74...75 # CHECK-LABEL: conditional_trap_opt_TW_2476 # CHECK: # %bb.0: # %entry77 # CHECK-NEXT: trap78 # CHECK-NOT: blr79 80---81name: conditional_trap_opt_no_trap_TW_2482alignment: 1683tracksRegLiveness: true84body: |85 bb.0.entry:86 %0:gprc = LI 387 %1:gprc = LI 388 TW 24, %1, %089 BLR8 implicit $lr8, implicit $rm90...91 # CHECK-LABEL: conditional_trap_opt_no_trap_TW_2492 # CHECK: # %bb.0: # %entry93 # CHECK-NEXT: blr94 95---96name: conditional_trap_opt_TW_2097alignment: 1698tracksRegLiveness: true99body: |100 bb.0.entry:101 %0:gprc = LI 3102 %1:gprc = LI 3103 TW 20, %1, %0104 BLR8 implicit $lr8, implicit $rm105...106 # CHECK-LABEL: conditional_trap_opt_TW_20107 # CHECK: # %bb.0: # %entry108 # CHECK-NEXT: trap109 # CHECK-NOT: blr110 111---112name: conditional_trap_opt_no_trap_TW_20113alignment: 16114tracksRegLiveness: true115body: |116 bb.0.entry:117 %0:gprc = LI 3118 %1:gprc = LI 5119 TW 20, %1, %0120 BLR8 implicit $lr8, implicit $rm121...122 # CHECK-LABEL: conditional_trap_opt_no_trap_TW_20123 # CHECK: # %bb.0: # %entry124 # CHECK-NEXT: blr125 126---127name: conditional_trap_opt_no_trap_TW_16128alignment: 16129tracksRegLiveness: true130body: |131 bb.0.entry:132 %0:gprc = LI 5133 %1:gprc = LI 1134 TW 16, %0, %1135 BLR8 implicit $lr8, implicit $rm136...137 # CHECK-LABEL: conditional_trap_opt_no_trap_TW_16138 # CHECK: # %bb.0: # %entry139 # CHECK-NEXT: blr140 141---142name: conditional_trap_opt_TW_16143alignment: 16144tracksRegLiveness: true145body: |146 bb.0.entry:147 %0:gprc = LI 5148 %1:gprc = LI 1149 TW 16, %1, %0150 TW 16, %0, %1151 BLR8 implicit $lr8, implicit $rm152...153 # CHECK-LABEL: conditional_trap_opt_TW_16154 # CHECK: # %bb.0: # %entry155 # CHECK-NEXT: trap156 # CHECK-NOT: blr157 158---159name: conditional_trap_opt_TW_8160alignment: 16161tracksRegLiveness: true162body: |163 bb.0.entry:164 %0:gprc = LI -1165 %1:gprc = LI 10166 TW 8, %1, %0167 TW 8, %0, %1168 BLR8 implicit $lr8, implicit $rm169...170 # CHECK-LABEL: conditional_trap_opt_TW_8171 # CHECK: # %bb.0: # %entry172 # CHECK-NEXT: trap173 # CHECK-NOT: blr174 175---176name: conditional_trap_opt_TW_2177alignment: 16178tracksRegLiveness: true179body: |180 bb.0.entry:181 %0:gprc = LI -1182 %1:gprc = LI 2183 TW 2, %1, %0184 TW 2, %0, %1185 BLR8 implicit $lr8, implicit $rm186...187 # CHECK-LABEL: conditional_trap_opt_TW_2188 # CHECK: # %bb.0: # %entry189 # CHECK-NEXT: trap190 # CHECK-NOT: blr191 192---193name: conditional_trap_opt_TW_1194alignment: 16195tracksRegLiveness: true196body: |197 bb.0.entry:198 %0:gprc = LI -3199 %1:gprc = LI 4200 TW 1, %1, %0201 TW 1, %0, %1202 BLR8 implicit $lr8, implicit $rm203...204 # CHECK-LABEL: conditional_trap_opt_TW_1205 # CHECK: # %bb.0: # %entry206 # CHECK-NEXT: trap207 # CHECK-NOT: blr208 209---210name: conditional_trap_opt_TW_4211alignment: 16212tracksRegLiveness: true213body: |214 bb.0.entry:215 %0:gprc = LI 5216 %1:gprc = LI 1217 TW 4, %1, %0218 TW 4, %1, %1219 BLR8 implicit $lr8, implicit $rm220...221 # CHECK-LABEL: conditional_trap_opt_TW_4222 # CHECK: # %bb.0: # %entry223 # CHECK-NEXT: trap224 # CHECK-NOT: blr225 226---227name: conditional_trap_opt_TWI_31228alignment: 16229tracksRegLiveness: true230body: |231 bb.0.entry:232 %0:gprc = LI 3233 TWI 31, %0, 0234 BLR8 implicit $lr8, implicit $rm235...236 # CHECK-LABEL: conditional_trap_opt_TWI_31237 # CHECK: # %bb.0: # %entry238 # CHECK-NEXT: trap239 # CHECK-NOT: blr240 241---242name: conditional_trap_opt_TWI_24243alignment: 16244tracksRegLiveness: true245body: |246 bb.0.entry:247 %0:gprc = LI 3248 TWI 24, %0, 0249 BLR8 implicit $lr8, implicit $rm250...251 # CHECK-LABEL: conditional_trap_opt_TWI_24252 # CHECK: # %bb.0: # %entry253 # CHECK-NEXT: trap254 # CHECK-NOT: blr255 256---257name: conditional_trap_opt_no_trap_TWI_24258alignment: 16259tracksRegLiveness: true260body: |261 bb.0.entry:262 %0:gprc = LI 0263 TWI 24, %0, 0264 BLR8 implicit $lr8, implicit $rm265...266 # CHECK-LABEL: conditional_trap_opt_no_trap_TWI_24267 # CHECK: # %bb.0: # %entry268 # CHECK-NEXT: blr269 270---271name: conditional_trap_opt_TWI_20272alignment: 16273tracksRegLiveness: true274body: |275 bb.0.entry:276 %0:gprc = LI 3277 TWI 20, %0, 3278 BLR8 implicit $lr8, implicit $rm279...280 # CHECK-LABEL: conditional_trap_opt_TWI_20281 # CHECK: # %bb.0: # %entry282 # CHECK-NEXT: trap283 # CHECK-NOT: blr284 285---286name: conditional_trap_opt_no_trap_TWI_20287alignment: 16288tracksRegLiveness: true289body: |290 bb.0.entry:291 %0:gprc = LI 3292 TWI 20, %0, 0293 BLR8 implicit $lr8, implicit $rm294...295 # CHECK-LABEL: conditional_trap_opt_no_trap_TWI_20296 # CHECK: # %bb.0: # %entry297 # CHECK-NEXT: blr298 299---300name: conditional_trap_opt_no_trap_TWI_16301alignment: 16302tracksRegLiveness: true303body: |304 bb.0.entry:305 %0:gprc = LI 5306 TWI 16, %0, 1307 BLR8 implicit $lr8, implicit $rm308...309 # CHECK-LABEL: conditional_trap_opt_no_trap_TWI_16310 # CHECK: # %bb.0: # %entry311 # CHECK-NEXT: blr312 313---314name: conditional_trap_opt_TWI_16315alignment: 16316tracksRegLiveness: true317body: |318 bb.0.entry:319 %0:gprc = LI 5320 %1:gprc = LI 1321 TWI 16, %1, 5322 TWI 16, %0, 1323 BLR8 implicit $lr8, implicit $rm324...325 # CHECK-LABEL: conditional_trap_opt_TWI_16326 # CHECK: # %bb.0: # %entry327 # CHECK-NEXT: trap328 # CHECK-NOT: blr329 330---331name: conditional_trap_opt_TWI_8332alignment: 16333tracksRegLiveness: true334body: |335 bb.0.entry:336 %0:gprc = LI -1337 %1:gprc = LI 10338 TWI 8, %1, -1339 TWI 8, %0, 10340 BLR8 implicit $lr8, implicit $rm341...342 # CHECK-LABEL: conditional_trap_opt_TWI_8343 # CHECK: # %bb.0: # %entry344 # CHECK-NEXT: trap345 # CHECK-NOT: blr346 347---348name: conditional_trap_opt_TWI_2349alignment: 16350tracksRegLiveness: true351body: |352 bb.0.entry:353 %0:gprc = LI -1354 %1:gprc = LI 2355 TWI 2, %1, -1356 TWI 2, %0, 2357 BLR8 implicit $lr8, implicit $rm358...359 # CHECK-LABEL: conditional_trap_opt_TWI_2360 # CHECK: # %bb.0: # %entry361 # CHECK-NEXT: trap362 # CHECK-NOT: blr363 364---365name: conditional_trap_opt_TWI_1366alignment: 16367tracksRegLiveness: true368body: |369 bb.0.entry:370 %0:gprc = LI -3371 %1:gprc = LI 4372 TWI 1, %1, -3373 TWI 1, %0, 4374 BLR8 implicit $lr8, implicit $rm375...376 # CHECK-LABEL: conditional_trap_opt_TWI_1377 # CHECK: # %bb.0: # %entry378 # CHECK-NEXT: trap379 # CHECK-NOT: blr380 381---382name: conditional_trap_opt_TWI_4383alignment: 16384tracksRegLiveness: true385body: |386 bb.0.entry:387 %0:gprc = LI 5388 %1:gprc = LI 1389 TWI 4, %1, 5390 TWI 4, %1, 1391 BLR8 implicit $lr8, implicit $rm392...393 # CHECK-LABEL: conditional_trap_opt_TWI_4394 # CHECK: # %bb.0: # %entry395 # CHECK-NEXT: trap396 # CHECK-NOT: blr397 398---399name: conditional_trap_opt_TD_31400alignment: 16401tracksRegLiveness: true402body: |403 bb.0.entry:404 %0:g8rc = LI8 3405 %1:g8rc = LI8 0406 TD 31, %1, %0407 BLR8 implicit $lr8, implicit $rm408...409 # CHECK-LABEL: conditional_trap_opt_TD_31410 # CHECK: # %bb.0: # %entry411 # CHECK-NEXT: trap412 # CHECK-NOT: blr413 414---415name: conditional_trap_opt_TD_24416alignment: 16417tracksRegLiveness: true418body: |419 bb.0.entry:420 %0:g8rc = LI8 3421 %1:g8rc = LI8 0422 TD 24, %1, %0423 BLR8 implicit $lr8, implicit $rm424...425 # CHECK-LABEL: conditional_trap_opt_TD_24426 # CHECK: # %bb.0: # %entry427 # CHECK-NEXT: trap428 # CHECK-NOT: blr429 430---431name: conditional_trap_opt_no_trap_TD_24432alignment: 16433tracksRegLiveness: true434body: |435 bb.0.entry:436 %0:g8rc = LI8 3437 %1:g8rc = LI8 3438 TD 24, %1, %0439 BLR8 implicit $lr8, implicit $rm440...441 # CHECK-LABEL: conditional_trap_opt_no_trap_TD_24442 # CHECK: # %bb.0: # %entry443 # CHECK-NEXT: blr444 445---446name: conditional_trap_opt_TD_20447alignment: 16448tracksRegLiveness: true449body: |450 bb.0.entry:451 %0:g8rc = LI8 3452 %1:g8rc = LI8 3453 TD 20, %1, %0454 BLR8 implicit $lr8, implicit $rm455...456 # CHECK-LABEL: conditional_trap_opt_TD_20457 # CHECK: # %bb.0: # %entry458 # CHECK-NEXT: trap459 # CHECK-NOT: blr460 461---462name: conditional_trap_opt_no_trap_TD_20463alignment: 16464tracksRegLiveness: true465body: |466 bb.0.entry:467 %0:g8rc = LI8 3468 %1:g8rc = LI8 5469 TD 20, %1, %0470 BLR8 implicit $lr8, implicit $rm471...472 # CHECK-LABEL: conditional_trap_opt_no_trap_TD_20473 # CHECK: # %bb.0: # %entry474 # CHECK-NEXT: blr475 476---477name: conditional_trap_opt_no_trap_TD_16478alignment: 16479tracksRegLiveness: true480body: |481 bb.0.entry:482 %0:g8rc = LI8 5483 %1:g8rc = LI8 1484 TD 16, %0, %1485 BLR8 implicit $lr8, implicit $rm486...487 # CHECK-LABEL: conditional_trap_opt_no_trap_TD_16488 # CHECK: # %bb.0: # %entry489 # CHECK-NEXT: blr490 491---492name: conditional_trap_opt_TD_16493alignment: 16494tracksRegLiveness: true495body: |496 bb.0.entry:497 %0:g8rc = LI8 5498 %1:g8rc = LI8 1499 TD 16, %1, %0500 TD 16, %0, %1501 BLR8 implicit $lr8, implicit $rm502...503 # CHECK-LABEL: conditional_trap_opt_TD_16504 # CHECK: # %bb.0: # %entry505 # CHECK-NEXT: trap506 # CHECK-NOT: blr507 508---509name: conditional_trap_opt_TD_8510alignment: 16511tracksRegLiveness: true512body: |513 bb.0.entry:514 %0:g8rc = LI8 -1515 %1:g8rc = LI8 10516 TD 8, %1, %0517 TD 8, %0, %1518 BLR8 implicit $lr8, implicit $rm519...520 # CHECK-LABEL: conditional_trap_opt_TD_8521 # CHECK: # %bb.0: # %entry522 # CHECK-NEXT: trap523 # CHECK-NOT: blr524 525---526name: conditional_trap_opt_TD_2527alignment: 16528tracksRegLiveness: true529body: |530 bb.0.entry:531 %0:g8rc = LI8 -1532 %1:g8rc = LI8 2533 TD 2, %1, %0534 TD 2, %0, %1535 BLR8 implicit $lr8, implicit $rm536...537 # CHECK-LABEL: conditional_trap_opt_TD_2538 # CHECK: # %bb.0: # %entry539 # CHECK-NEXT: trap540 # CHECK-NOT: blr541 542---543name: conditional_trap_opt_TD_1544alignment: 16545tracksRegLiveness: true546body: |547 bb.0.entry:548 %0:g8rc = LI8 -3549 %1:g8rc = LI8 4550 TD 1, %1, %0551 TD 1, %0, %1552 BLR8 implicit $lr8, implicit $rm553...554 # CHECK-LABEL: conditional_trap_opt_TD_1555 # CHECK: # %bb.0: # %entry556 # CHECK-NEXT: trap557 # CHECK-NOT: blr558 559---560name: conditional_trap_opt_TD_4561alignment: 16562tracksRegLiveness: true563body: |564 bb.0.entry:565 %0:g8rc = LI8 5566 %1:g8rc = LI8 1567 TD 4, %1, %0568 TD 4, %1, %1569 BLR8 implicit $lr8, implicit $rm570...571 # CHECK-LABEL: conditional_trap_opt_TD_4572 # CHECK: # %bb.0: # %entry573 # CHECK-NEXT: trap574 # CHECK-NOT: blr575 576---577name: conditional_trap_opt_TDI_31578alignment: 16579tracksRegLiveness: true580body: |581 bb.0.entry:582 %0:g8rc = LI8 3583 TDI 31, %0, 0584 BLR8 implicit $lr8, implicit $rm585...586 # CHECK-LABEL: conditional_trap_opt_TDI_31587 # CHECK: # %bb.0: # %entry588 # CHECK-NEXT: trap589 # CHECK-NOT: blr590 591---592name: conditional_trap_opt_TDI_24593alignment: 16594tracksRegLiveness: true595body: |596 bb.0.entry:597 %0:g8rc = LI8 3598 TDI 24, %0, 0599 BLR8 implicit $lr8, implicit $rm600...601 # CHECK-LABEL: conditional_trap_opt_TDI_24602 # CHECK: # %bb.0: # %entry603 # CHECK-NEXT: trap604 # CHECK-NOT: blr605 606---607name: conditional_trap_opt_no_trap_TDI_24608alignment: 16609tracksRegLiveness: true610body: |611 bb.0.entry:612 %0:g8rc = LI8 0613 TDI 24, %0, 0614 BLR8 implicit $lr8, implicit $rm615...616 # CHECK-LABEL: conditional_trap_opt_no_trap_TDI_24617 # CHECK: # %bb.0: # %entry618 # CHECK-NEXT: blr619 620---621name: conditional_trap_opt_TDI_20622alignment: 16623tracksRegLiveness: true624body: |625 bb.0.entry:626 %0:g8rc = LI8 3627 TDI 20, %0, 3628 BLR8 implicit $lr8, implicit $rm629...630 # CHECK-LABEL: conditional_trap_opt_TDI_20631 # CHECK: # %bb.0: # %entry632 # CHECK-NEXT: trap633 # CHECK-NOT: blr634 635---636name: conditional_trap_opt_no_trap_TDI_20637alignment: 16638tracksRegLiveness: true639body: |640 bb.0.entry:641 %0:g8rc = LI8 5642 TDI 20, %0, 3643 BLR8 implicit $lr8, implicit $rm644...645 # CHECK-LABEL: conditional_trap_opt_no_trap_TDI_20646 # CHECK: # %bb.0: # %entry647 # CHECK-NEXT: blr648 649---650name: conditional_trap_opt_no_trap_TDI_16651alignment: 16652tracksRegLiveness: true653body: |654 bb.0.entry:655 %0:g8rc = LI8 5656 TDI 16, %0, 1657 BLR8 implicit $lr8, implicit $rm658...659 # CHECK-LABEL: conditional_trap_opt_no_trap_TDI_16660 # CHECK: # %bb.0: # %entry661 # CHECK-NEXT: blr662 663---664name: conditional_trap_opt_TDI_16665alignment: 16666tracksRegLiveness: true667body: |668 bb.0.entry:669 %0:g8rc = LI8 5670 %1:g8rc = LI8 1671 TDI 16, %1, 5672 TDI 16, %0, 1673 BLR8 implicit $lr8, implicit $rm674...675 # CHECK-LABEL: conditional_trap_opt_TDI_16676 # CHECK: # %bb.0: # %entry677 # CHECK-NEXT: trap678 # CHECK-NOT: blr679 680---681name: conditional_trap_opt_TDI_8682alignment: 16683tracksRegLiveness: true684body: |685 bb.0.entry:686 %0:g8rc = LI8 -1687 %1:g8rc = LI8 10688 TDI 8, %1, -1689 TDI 8, %0, 10690 BLR8 implicit $lr8, implicit $rm691...692 # CHECK-LABEL: conditional_trap_opt_TDI_8693 # CHECK: # %bb.0: # %entry694 # CHECK-NEXT: trap695 # CHECK-NOT: blr696 697---698name: conditional_trap_opt_TDI_2699alignment: 16700tracksRegLiveness: true701body: |702 bb.0.entry:703 %0:g8rc = LI8 -1704 %1:g8rc = LI8 2705 TDI 2, %1, -1706 TDI 2, %0, 2707 BLR8 implicit $lr8, implicit $rm708...709 # CHECK-LABEL: conditional_trap_opt_TDI_2710 # CHECK: # %bb.0: # %entry711 # CHECK-NEXT: trap712 # CHECK-NOT: blr713 714---715name: conditional_trap_opt_TDI_1716alignment: 16717tracksRegLiveness: true718body: |719 bb.0.entry:720 %0:g8rc = LI8 -3721 %1:g8rc = LI8 4722 TDI 1, %1, -3723 TDI 1, %0, 4724 BLR8 implicit $lr8, implicit $rm725...726 # CHECK-LABEL: conditional_trap_opt_TDI_1727 # CHECK: # %bb.0: # %entry728 # CHECK-NEXT: trap729 # CHECK-NOT: blr730 731---732name: conditional_trap_opt_TDI_4733alignment: 16734tracksRegLiveness: true735body: |736 bb.0.entry:737 %0:g8rc = LI8 5738 %1:g8rc = LI8 1739 TDI 4, %1, 5740 TDI 4, %1, 1741 BLR8 implicit $lr8, implicit $rm742...743 # CHECK-LABEL: conditional_trap_opt_TDI_4744 # CHECK: # %bb.0: # %entry745 # CHECK-NEXT: trap746 # CHECK-NOT: blr747 748---749name: conditional_trap_opt_multiple_traps750alignment: 16751tracksRegLiveness: true752body: |753 bb.0.entry:754 %0:gprc = LI 5755 %1:gprc = LI 1756 %2:g8rc = LI8 -1757 %3:g8rc = LI8 0758 TWI 31, %1, 5759 TDI 31, %3, 0760 TW 31, %0, %1761 TD 31, %2, %2762 BLR8 implicit $lr8, implicit $rm763...764 # CHECK-LABEL: conditional_trap_opt_multiple_traps765 # CHECK: # %bb.0: # %entry766 # CHECK-NEXT: trap767 # CHECK-NOT: blr768