1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -o - %s -start-before mips-delay-slot-filler -stop-after mips-branch-expansion | FileCheck %s --check-prefix=R6 3# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -o - %s -start-before mips-delay-slot-filler -stop-after mips-branch-expansion -relocation-model=pic | FileCheck %s --check-prefix=PIC 4 5# Test the long branch expansion of various branches 6 7--- | 8 define void @expand_BEQC(i1 %a) { 9 br i1 %a, label %iftrue, label %tail 10 11 iftrue: 12 call void asm sideeffect ".space 131068", ""() 13 br label %tail 14 15 tail: 16 ret void 17 } 18 19 define void @expand_BNEC(i1 %a) { 20 br i1 %a, label %iftrue, label %tail 21 22 iftrue: 23 call void asm sideeffect ".space 131068", ""() 24 br label %tail 25 26 tail: 27 ret void 28 } 29 30 define void @expand_BGEC(i1 %a) { 31 br i1 %a, label %iftrue, label %tail 32 33 iftrue: 34 call void asm sideeffect ".space 131068", ""() 35 br label %tail 36 37 tail: 38 ret void 39 } 40 41 define void @expand_BGEUC(i1 %a) { 42 br i1 %a, label %iftrue, label %tail 43 44 iftrue: 45 call void asm sideeffect ".space 131068", ""() 46 br label %tail 47 48 tail: 49 ret void 50 } 51 52 define void @expand_BGEZC(i1 %a) { 53 br i1 %a, label %iftrue, label %tail 54 55 iftrue: 56 call void asm sideeffect ".space 131068", ""() 57 br label %tail 58 59 tail: 60 ret void 61 } 62 63 define void @expand_BGTZC(i1 %a) { 64 br i1 %a, label %iftrue, label %tail 65 66 iftrue: 67 call void asm sideeffect ".space 131068", ""() 68 br label %tail 69 70 tail: 71 ret void 72 } 73 74 define void @expand_BLEZC(i1 %a) { 75 br i1 %a, label %iftrue, label %tail 76 77 iftrue: 78 call void asm sideeffect ".space 131068", ""() 79 br label %tail 80 81 tail: 82 ret void 83 } 84 85 define void @expand_BLTC(i1 %a) { 86 br i1 %a, label %iftrue, label %tail 87 88 iftrue: 89 call void asm sideeffect ".space 131068", ""() 90 br label %tail 91 92 tail: 93 ret void 94 } 95 96 define void @expand_BLTUC(i1 %a) { 97 br i1 %a, label %iftrue, label %tail 98 99 iftrue: 100 call void asm sideeffect ".space 131068", ""() 101 br label %tail 102 103 tail: 104 ret void 105 } 106 107 define void @expand_BLTZC(i1 %a) { 108 br i1 %a, label %iftrue, label %tail 109 110 iftrue: 111 call void asm sideeffect ".space 131068", ""() 112 br label %tail 113 114 tail: 115 ret void 116 } 117 118 define void @expand_BEQZC(i1 %a) { 119 br i1 %a, label %iftrue, label %tail 120 121 iftrue: 122 call void asm sideeffect ".space 8388608", ""() 123 br label %tail 124 125 tail: 126 ret void 127 } 128 129 define void @expand_BNEZC(i1 %a) { 130 br i1 %a, label %iftrue, label %tail 131 132 iftrue: 133 call void asm sideeffect ".space 8388608", ""() 134 br label %tail 135 136 tail: 137 ret void 138 } 139 140... 141--- 142 143name: expand_BEQC 144alignment: 4 145exposesReturnsTwice: false 146legalized: false 147regBankSelected: false 148selected: false 149failedISel: false 150tracksRegLiveness: true 151registers: 152liveins: 153 - { reg: '$a0', virtual-reg: '' } 154frameInfo: 155 isFrameAddressTaken: false 156 isReturnAddressTaken: false 157 hasStackMap: false 158 hasPatchPoint: false 159 stackSize: 0 160 offsetAdjustment: 0 161 maxAlignment: 1 162 adjustsStack: false 163 hasCalls: false 164 stackProtector: '' 165 maxCallFrameSize: 0 166 hasOpaqueSPAdjustment: false 167 hasVAStart: false 168 hasMustTailInVarArgFunc: false 169 localFrameSize: 0 170 savePoint: '' 171 restorePoint: '' 172fixedStack: 173stack: 174constants: 175body: | 176 ; R6-LABEL: name: expand_BEQC 177 ; R6: bb.0 (%ir-block.0): 178 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 179 ; R6: renamable $at = ANDi killed renamable $a0, 1 180 ; R6: BNEC $at, $zero, %bb.2, implicit-def $at 181 ; R6: bb.1 (%ir-block.0): 182 ; R6: successors: %bb.3(0x80000000) 183 ; R6: BC %bb.3 184 ; R6: bb.2.iftrue: 185 ; R6: successors: %bb.3(0x80000000) 186 ; R6: INLINEASM &".space 131068", 1 187 ; R6: bb.3.tail: 188 ; R6: JIC undef $ra, 0, implicit-def $at 189 ; PIC-LABEL: name: expand_BEQC 190 ; PIC: bb.0 (%ir-block.0): 191 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 192 ; PIC: renamable $at = ANDi killed renamable $a0, 1 193 ; PIC: BNEC $at, $zero, %bb.3, implicit-def $at 194 ; PIC: bb.1 (%ir-block.0): 195 ; PIC: successors: %bb.2(0x80000000) 196 ; PIC: $sp = ADDiu $sp, -8 197 ; PIC: SW $ra, $sp, 0 198 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 199 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 200 ; PIC: BALC %bb.2, implicit-def $ra 201 ; PIC: bb.2 (%ir-block.0): 202 ; PIC: successors: %bb.4(0x80000000) 203 ; PIC: $at = ADDu $ra, $at 204 ; PIC: $ra = LW $sp, 0 205 ; PIC: $sp = ADDiu $sp, 8 206 ; PIC: JIC $at, 0, implicit-def $at 207 ; PIC: bb.3.iftrue: 208 ; PIC: successors: %bb.4(0x80000000) 209 ; PIC: INLINEASM &".space 131068", 1 210 ; PIC: bb.4.tail: 211 ; PIC: JIC undef $ra, 0, implicit-def $at 212 bb.0 (%ir-block.0): 213 successors: %bb.1(0x40000000), %bb.2(0x40000000) 214 liveins: $a0 215 216 renamable $at = ANDi killed renamable $a0, 1 217 BEQC killed renamable $at, $zero, %bb.2, implicit-def $at 218 219 bb.1.iftrue: 220 successors: %bb.2(0x80000000) 221 222 INLINEASM &".space 131068", 1 223 224 bb.2.tail: 225 PseudoReturn undef $ra 226 227... 228--- 229 230name: expand_BNEC 231alignment: 4 232exposesReturnsTwice: false 233legalized: false 234regBankSelected: false 235selected: false 236failedISel: false 237tracksRegLiveness: true 238registers: 239liveins: 240 - { reg: '$a0', virtual-reg: '' } 241frameInfo: 242 isFrameAddressTaken: false 243 isReturnAddressTaken: false 244 hasStackMap: false 245 hasPatchPoint: false 246 stackSize: 0 247 offsetAdjustment: 0 248 maxAlignment: 1 249 adjustsStack: false 250 hasCalls: false 251 stackProtector: '' 252 maxCallFrameSize: 0 253 hasOpaqueSPAdjustment: false 254 hasVAStart: false 255 hasMustTailInVarArgFunc: false 256 localFrameSize: 0 257 savePoint: '' 258 restorePoint: '' 259fixedStack: 260stack: 261constants: 262body: | 263 ; R6-LABEL: name: expand_BNEC 264 ; R6: bb.0 (%ir-block.0): 265 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 266 ; R6: renamable $at = ANDi killed renamable $a0, 1 267 ; R6: BEQC $at, $zero, %bb.2, implicit-def $at 268 ; R6: bb.1 (%ir-block.0): 269 ; R6: successors: %bb.3(0x80000000) 270 ; R6: BC %bb.3 271 ; R6: bb.2.iftrue: 272 ; R6: successors: %bb.3(0x80000000) 273 ; R6: INLINEASM &".space 131068", 1 274 ; R6: bb.3.tail: 275 ; R6: JIC undef $ra, 0, implicit-def $at 276 ; PIC-LABEL: name: expand_BNEC 277 ; PIC: bb.0 (%ir-block.0): 278 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 279 ; PIC: renamable $at = ANDi killed renamable $a0, 1 280 ; PIC: BEQC $at, $zero, %bb.3, implicit-def $at 281 ; PIC: bb.1 (%ir-block.0): 282 ; PIC: successors: %bb.2(0x80000000) 283 ; PIC: $sp = ADDiu $sp, -8 284 ; PIC: SW $ra, $sp, 0 285 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 286 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 287 ; PIC: BALC %bb.2, implicit-def $ra 288 ; PIC: bb.2 (%ir-block.0): 289 ; PIC: successors: %bb.4(0x80000000) 290 ; PIC: $at = ADDu $ra, $at 291 ; PIC: $ra = LW $sp, 0 292 ; PIC: $sp = ADDiu $sp, 8 293 ; PIC: JIC $at, 0, implicit-def $at 294 ; PIC: bb.3.iftrue: 295 ; PIC: successors: %bb.4(0x80000000) 296 ; PIC: INLINEASM &".space 131068", 1 297 ; PIC: bb.4.tail: 298 ; PIC: JIC undef $ra, 0, implicit-def $at 299 bb.0 (%ir-block.0): 300 successors: %bb.1(0x40000000), %bb.2(0x40000000) 301 liveins: $a0 302 303 renamable $at = ANDi killed renamable $a0, 1 304 BNEC killed renamable $at, $zero, %bb.2, implicit-def $at 305 306 bb.1.iftrue: 307 successors: %bb.2(0x80000000) 308 309 INLINEASM &".space 131068", 1 310 311 bb.2.tail: 312 PseudoReturn undef $ra 313 314... 315--- 316 317name: expand_BGEC 318alignment: 4 319exposesReturnsTwice: false 320legalized: false 321regBankSelected: false 322selected: false 323failedISel: false 324tracksRegLiveness: true 325registers: 326liveins: 327 - { reg: '$a0', virtual-reg: '' } 328frameInfo: 329 isFrameAddressTaken: false 330 isReturnAddressTaken: false 331 hasStackMap: false 332 hasPatchPoint: false 333 stackSize: 0 334 offsetAdjustment: 0 335 maxAlignment: 1 336 adjustsStack: false 337 hasCalls: false 338 stackProtector: '' 339 maxCallFrameSize: 0 340 hasOpaqueSPAdjustment: false 341 hasVAStart: false 342 hasMustTailInVarArgFunc: false 343 localFrameSize: 0 344 savePoint: '' 345 restorePoint: '' 346fixedStack: 347stack: 348constants: 349body: | 350 ; R6-LABEL: name: expand_BGEC 351 ; R6: bb.0 (%ir-block.0): 352 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 353 ; R6: renamable $at = ANDi killed renamable $a0, 1 354 ; R6: BLTC $at, $zero, %bb.2, implicit-def $at 355 ; R6: bb.1 (%ir-block.0): 356 ; R6: successors: %bb.3(0x80000000) 357 ; R6: BC %bb.3 358 ; R6: bb.2.iftrue: 359 ; R6: successors: %bb.3(0x80000000) 360 ; R6: INLINEASM &".space 131068", 1 361 ; R6: bb.3.tail: 362 ; R6: JIC undef $ra, 0, implicit-def $at 363 ; PIC-LABEL: name: expand_BGEC 364 ; PIC: bb.0 (%ir-block.0): 365 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 366 ; PIC: renamable $at = ANDi killed renamable $a0, 1 367 ; PIC: BLTC $at, $zero, %bb.3, implicit-def $at 368 ; PIC: bb.1 (%ir-block.0): 369 ; PIC: successors: %bb.2(0x80000000) 370 ; PIC: $sp = ADDiu $sp, -8 371 ; PIC: SW $ra, $sp, 0 372 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 373 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 374 ; PIC: BALC %bb.2, implicit-def $ra 375 ; PIC: bb.2 (%ir-block.0): 376 ; PIC: successors: %bb.4(0x80000000) 377 ; PIC: $at = ADDu $ra, $at 378 ; PIC: $ra = LW $sp, 0 379 ; PIC: $sp = ADDiu $sp, 8 380 ; PIC: JIC $at, 0, implicit-def $at 381 ; PIC: bb.3.iftrue: 382 ; PIC: successors: %bb.4(0x80000000) 383 ; PIC: INLINEASM &".space 131068", 1 384 ; PIC: bb.4.tail: 385 ; PIC: JIC undef $ra, 0, implicit-def $at 386 bb.0 (%ir-block.0): 387 successors: %bb.1(0x40000000), %bb.2(0x40000000) 388 liveins: $a0 389 390 renamable $at = ANDi killed renamable $a0, 1 391 BGEC killed renamable $at, $zero, %bb.2, implicit-def $at 392 393 bb.1.iftrue: 394 successors: %bb.2(0x80000000) 395 396 INLINEASM &".space 131068", 1 397 398 bb.2.tail: 399 PseudoReturn undef $ra 400 401... 402--- 403 404name: expand_BGEUC 405alignment: 4 406exposesReturnsTwice: false 407legalized: false 408regBankSelected: false 409selected: false 410failedISel: false 411tracksRegLiveness: true 412registers: 413liveins: 414 - { reg: '$a0', virtual-reg: '' } 415frameInfo: 416 isFrameAddressTaken: false 417 isReturnAddressTaken: false 418 hasStackMap: false 419 hasPatchPoint: false 420 stackSize: 0 421 offsetAdjustment: 0 422 maxAlignment: 1 423 adjustsStack: false 424 hasCalls: false 425 stackProtector: '' 426 maxCallFrameSize: 0 427 hasOpaqueSPAdjustment: false 428 hasVAStart: false 429 hasMustTailInVarArgFunc: false 430 localFrameSize: 0 431 savePoint: '' 432 restorePoint: '' 433fixedStack: 434stack: 435constants: 436body: | 437 ; R6-LABEL: name: expand_BGEUC 438 ; R6: bb.0 (%ir-block.0): 439 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 440 ; R6: renamable $at = ANDi killed renamable $a0, 1 441 ; R6: BLTUC $at, $zero, %bb.2, implicit-def $at 442 ; R6: bb.1 (%ir-block.0): 443 ; R6: successors: %bb.3(0x80000000) 444 ; R6: BC %bb.3 445 ; R6: bb.2.iftrue: 446 ; R6: successors: %bb.3(0x80000000) 447 ; R6: INLINEASM &".space 131068", 1 448 ; R6: bb.3.tail: 449 ; R6: JIC undef $ra, 0, implicit-def $at 450 ; PIC-LABEL: name: expand_BGEUC 451 ; PIC: bb.0 (%ir-block.0): 452 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 453 ; PIC: renamable $at = ANDi killed renamable $a0, 1 454 ; PIC: BLTUC $at, $zero, %bb.3, implicit-def $at 455 ; PIC: bb.1 (%ir-block.0): 456 ; PIC: successors: %bb.2(0x80000000) 457 ; PIC: $sp = ADDiu $sp, -8 458 ; PIC: SW $ra, $sp, 0 459 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 460 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 461 ; PIC: BALC %bb.2, implicit-def $ra 462 ; PIC: bb.2 (%ir-block.0): 463 ; PIC: successors: %bb.4(0x80000000) 464 ; PIC: $at = ADDu $ra, $at 465 ; PIC: $ra = LW $sp, 0 466 ; PIC: $sp = ADDiu $sp, 8 467 ; PIC: JIC $at, 0, implicit-def $at 468 ; PIC: bb.3.iftrue: 469 ; PIC: successors: %bb.4(0x80000000) 470 ; PIC: INLINEASM &".space 131068", 1 471 ; PIC: bb.4.tail: 472 ; PIC: JIC undef $ra, 0, implicit-def $at 473 bb.0 (%ir-block.0): 474 successors: %bb.1(0x40000000), %bb.2(0x40000000) 475 liveins: $a0 476 477 renamable $at = ANDi killed renamable $a0, 1 478 BGEUC killed renamable $at, $zero, %bb.2, implicit-def $at 479 480 bb.1.iftrue: 481 successors: %bb.2(0x80000000) 482 483 INLINEASM &".space 131068", 1 484 485 bb.2.tail: 486 PseudoReturn undef $ra 487 488... 489--- 490 491name: expand_BGEZC 492alignment: 4 493exposesReturnsTwice: false 494legalized: false 495regBankSelected: false 496selected: false 497failedISel: false 498tracksRegLiveness: true 499registers: 500liveins: 501 - { reg: '$a0', virtual-reg: '' } 502frameInfo: 503 isFrameAddressTaken: false 504 isReturnAddressTaken: false 505 hasStackMap: false 506 hasPatchPoint: false 507 stackSize: 0 508 offsetAdjustment: 0 509 maxAlignment: 1 510 adjustsStack: false 511 hasCalls: false 512 stackProtector: '' 513 maxCallFrameSize: 0 514 hasOpaqueSPAdjustment: false 515 hasVAStart: false 516 hasMustTailInVarArgFunc: false 517 localFrameSize: 0 518 savePoint: '' 519 restorePoint: '' 520fixedStack: 521stack: 522constants: 523body: | 524 ; R6-LABEL: name: expand_BGEZC 525 ; R6: bb.0 (%ir-block.0): 526 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 527 ; R6: renamable $at = ANDi killed renamable $a0, 1 528 ; R6: BLTZC $at, %bb.2, implicit-def $at 529 ; R6: bb.1 (%ir-block.0): 530 ; R6: successors: %bb.3(0x80000000) 531 ; R6: BC %bb.3 532 ; R6: bb.2.iftrue: 533 ; R6: successors: %bb.3(0x80000000) 534 ; R6: INLINEASM &".space 131068", 1 535 ; R6: bb.3.tail: 536 ; R6: JIC undef $ra, 0, implicit-def $at 537 ; PIC-LABEL: name: expand_BGEZC 538 ; PIC: bb.0 (%ir-block.0): 539 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 540 ; PIC: renamable $at = ANDi killed renamable $a0, 1 541 ; PIC: BLTZC $at, %bb.3, implicit-def $at 542 ; PIC: bb.1 (%ir-block.0): 543 ; PIC: successors: %bb.2(0x80000000) 544 ; PIC: $sp = ADDiu $sp, -8 545 ; PIC: SW $ra, $sp, 0 546 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 547 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 548 ; PIC: BALC %bb.2, implicit-def $ra 549 ; PIC: bb.2 (%ir-block.0): 550 ; PIC: successors: %bb.4(0x80000000) 551 ; PIC: $at = ADDu $ra, $at 552 ; PIC: $ra = LW $sp, 0 553 ; PIC: $sp = ADDiu $sp, 8 554 ; PIC: JIC $at, 0, implicit-def $at 555 ; PIC: bb.3.iftrue: 556 ; PIC: successors: %bb.4(0x80000000) 557 ; PIC: INLINEASM &".space 131068", 1 558 ; PIC: bb.4.tail: 559 ; PIC: JIC undef $ra, 0, implicit-def $at 560 bb.0 (%ir-block.0): 561 successors: %bb.1(0x40000000), %bb.2(0x40000000) 562 liveins: $a0 563 564 renamable $at = ANDi killed renamable $a0, 1 565 BGEZC killed renamable $at, %bb.2, implicit-def $at 566 567 bb.1.iftrue: 568 successors: %bb.2(0x80000000) 569 570 INLINEASM &".space 131068", 1 571 572 bb.2.tail: 573 PseudoReturn undef $ra 574 575... 576--- 577 578name: expand_BGTZC 579alignment: 4 580exposesReturnsTwice: false 581legalized: false 582regBankSelected: false 583selected: false 584failedISel: false 585tracksRegLiveness: true 586registers: 587liveins: 588 - { reg: '$a0', virtual-reg: '' } 589frameInfo: 590 isFrameAddressTaken: false 591 isReturnAddressTaken: false 592 hasStackMap: false 593 hasPatchPoint: false 594 stackSize: 0 595 offsetAdjustment: 0 596 maxAlignment: 1 597 adjustsStack: false 598 hasCalls: false 599 stackProtector: '' 600 maxCallFrameSize: 0 601 hasOpaqueSPAdjustment: false 602 hasVAStart: false 603 hasMustTailInVarArgFunc: false 604 localFrameSize: 0 605 savePoint: '' 606 restorePoint: '' 607fixedStack: 608stack: 609constants: 610body: | 611 ; R6-LABEL: name: expand_BGTZC 612 ; R6: bb.0 (%ir-block.0): 613 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 614 ; R6: renamable $at = ANDi killed renamable $a0, 1 615 ; R6: BLEZC $at, %bb.2, implicit-def $at 616 ; R6: bb.1 (%ir-block.0): 617 ; R6: successors: %bb.3(0x80000000) 618 ; R6: BC %bb.3 619 ; R6: bb.2.iftrue: 620 ; R6: successors: %bb.3(0x80000000) 621 ; R6: INLINEASM &".space 131068", 1 622 ; R6: bb.3.tail: 623 ; R6: JIC undef $ra, 0, implicit-def $at 624 ; PIC-LABEL: name: expand_BGTZC 625 ; PIC: bb.0 (%ir-block.0): 626 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 627 ; PIC: renamable $at = ANDi killed renamable $a0, 1 628 ; PIC: BLEZC $at, %bb.3, implicit-def $at 629 ; PIC: bb.1 (%ir-block.0): 630 ; PIC: successors: %bb.2(0x80000000) 631 ; PIC: $sp = ADDiu $sp, -8 632 ; PIC: SW $ra, $sp, 0 633 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 634 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 635 ; PIC: BALC %bb.2, implicit-def $ra 636 ; PIC: bb.2 (%ir-block.0): 637 ; PIC: successors: %bb.4(0x80000000) 638 ; PIC: $at = ADDu $ra, $at 639 ; PIC: $ra = LW $sp, 0 640 ; PIC: $sp = ADDiu $sp, 8 641 ; PIC: JIC $at, 0, implicit-def $at 642 ; PIC: bb.3.iftrue: 643 ; PIC: successors: %bb.4(0x80000000) 644 ; PIC: INLINEASM &".space 131068", 1 645 ; PIC: bb.4.tail: 646 ; PIC: JIC undef $ra, 0, implicit-def $at 647 bb.0 (%ir-block.0): 648 successors: %bb.1(0x40000000), %bb.2(0x40000000) 649 liveins: $a0 650 651 renamable $at = ANDi killed renamable $a0, 1 652 BGTZC killed renamable $at, %bb.2, implicit-def $at 653 654 bb.1.iftrue: 655 successors: %bb.2(0x80000000) 656 657 INLINEASM &".space 131068", 1 658 659 bb.2.tail: 660 PseudoReturn undef $ra 661 662... 663--- 664 665name: expand_BLEZC 666alignment: 4 667exposesReturnsTwice: false 668legalized: false 669regBankSelected: false 670selected: false 671failedISel: false 672tracksRegLiveness: true 673registers: 674liveins: 675 - { reg: '$a0', virtual-reg: '' } 676frameInfo: 677 isFrameAddressTaken: false 678 isReturnAddressTaken: false 679 hasStackMap: false 680 hasPatchPoint: false 681 stackSize: 0 682 offsetAdjustment: 0 683 maxAlignment: 1 684 adjustsStack: false 685 hasCalls: false 686 stackProtector: '' 687 maxCallFrameSize: 0 688 hasOpaqueSPAdjustment: false 689 hasVAStart: false 690 hasMustTailInVarArgFunc: false 691 localFrameSize: 0 692 savePoint: '' 693 restorePoint: '' 694fixedStack: 695stack: 696constants: 697body: | 698 ; R6-LABEL: name: expand_BLEZC 699 ; R6: bb.0 (%ir-block.0): 700 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 701 ; R6: renamable $at = ANDi killed renamable $a0, 1 702 ; R6: BGTZC $at, %bb.2, implicit-def $at 703 ; R6: bb.1 (%ir-block.0): 704 ; R6: successors: %bb.3(0x80000000) 705 ; R6: BC %bb.3 706 ; R6: bb.2.iftrue: 707 ; R6: successors: %bb.3(0x80000000) 708 ; R6: INLINEASM &".space 131068", 1 709 ; R6: bb.3.tail: 710 ; R6: JIC undef $ra, 0, implicit-def $at 711 ; PIC-LABEL: name: expand_BLEZC 712 ; PIC: bb.0 (%ir-block.0): 713 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 714 ; PIC: renamable $at = ANDi killed renamable $a0, 1 715 ; PIC: BGTZC $at, %bb.3, implicit-def $at 716 ; PIC: bb.1 (%ir-block.0): 717 ; PIC: successors: %bb.2(0x80000000) 718 ; PIC: $sp = ADDiu $sp, -8 719 ; PIC: SW $ra, $sp, 0 720 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 721 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 722 ; PIC: BALC %bb.2, implicit-def $ra 723 ; PIC: bb.2 (%ir-block.0): 724 ; PIC: successors: %bb.4(0x80000000) 725 ; PIC: $at = ADDu $ra, $at 726 ; PIC: $ra = LW $sp, 0 727 ; PIC: $sp = ADDiu $sp, 8 728 ; PIC: JIC $at, 0, implicit-def $at 729 ; PIC: bb.3.iftrue: 730 ; PIC: successors: %bb.4(0x80000000) 731 ; PIC: INLINEASM &".space 131068", 1 732 ; PIC: bb.4.tail: 733 ; PIC: JIC undef $ra, 0, implicit-def $at 734 bb.0 (%ir-block.0): 735 successors: %bb.1(0x40000000), %bb.2(0x40000000) 736 liveins: $a0 737 738 renamable $at = ANDi killed renamable $a0, 1 739 BLEZC killed renamable $at, %bb.2, implicit-def $at 740 741 bb.1.iftrue: 742 successors: %bb.2(0x80000000) 743 744 INLINEASM &".space 131068", 1 745 746 bb.2.tail: 747 PseudoReturn undef $ra 748 749... 750--- 751 752name: expand_BLTC 753alignment: 4 754exposesReturnsTwice: false 755legalized: false 756regBankSelected: false 757selected: false 758failedISel: false 759tracksRegLiveness: true 760registers: 761liveins: 762 - { reg: '$a0', virtual-reg: '' } 763frameInfo: 764 isFrameAddressTaken: false 765 isReturnAddressTaken: false 766 hasStackMap: false 767 hasPatchPoint: false 768 stackSize: 0 769 offsetAdjustment: 0 770 maxAlignment: 1 771 adjustsStack: false 772 hasCalls: false 773 stackProtector: '' 774 maxCallFrameSize: 0 775 hasOpaqueSPAdjustment: false 776 hasVAStart: false 777 hasMustTailInVarArgFunc: false 778 localFrameSize: 0 779 savePoint: '' 780 restorePoint: '' 781fixedStack: 782stack: 783constants: 784body: | 785 ; R6-LABEL: name: expand_BLTC 786 ; R6: bb.0 (%ir-block.0): 787 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 788 ; R6: renamable $at = ANDi killed renamable $a0, 1 789 ; R6: BGEC $at, $zero, %bb.2, implicit-def $at 790 ; R6: bb.1 (%ir-block.0): 791 ; R6: successors: %bb.3(0x80000000) 792 ; R6: BC %bb.3 793 ; R6: bb.2.iftrue: 794 ; R6: successors: %bb.3(0x80000000) 795 ; R6: INLINEASM &".space 131068", 1 796 ; R6: bb.3.tail: 797 ; R6: JIC undef $ra, 0, implicit-def $at 798 ; PIC-LABEL: name: expand_BLTC 799 ; PIC: bb.0 (%ir-block.0): 800 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 801 ; PIC: renamable $at = ANDi killed renamable $a0, 1 802 ; PIC: BGEC $at, $zero, %bb.3, implicit-def $at 803 ; PIC: bb.1 (%ir-block.0): 804 ; PIC: successors: %bb.2(0x80000000) 805 ; PIC: $sp = ADDiu $sp, -8 806 ; PIC: SW $ra, $sp, 0 807 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 808 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 809 ; PIC: BALC %bb.2, implicit-def $ra 810 ; PIC: bb.2 (%ir-block.0): 811 ; PIC: successors: %bb.4(0x80000000) 812 ; PIC: $at = ADDu $ra, $at 813 ; PIC: $ra = LW $sp, 0 814 ; PIC: $sp = ADDiu $sp, 8 815 ; PIC: JIC $at, 0, implicit-def $at 816 ; PIC: bb.3.iftrue: 817 ; PIC: successors: %bb.4(0x80000000) 818 ; PIC: INLINEASM &".space 131068", 1 819 ; PIC: bb.4.tail: 820 ; PIC: JIC undef $ra, 0, implicit-def $at 821 bb.0 (%ir-block.0): 822 successors: %bb.1(0x40000000), %bb.2(0x40000000) 823 liveins: $a0 824 825 renamable $at = ANDi killed renamable $a0, 1 826 BLTC killed renamable $at, $zero, %bb.2, implicit-def $at 827 828 bb.1.iftrue: 829 successors: %bb.2(0x80000000) 830 831 INLINEASM &".space 131068", 1 832 833 bb.2.tail: 834 PseudoReturn undef $ra 835 836... 837--- 838 839name: expand_BLTUC 840alignment: 4 841exposesReturnsTwice: false 842legalized: false 843regBankSelected: false 844selected: false 845failedISel: false 846tracksRegLiveness: true 847registers: 848liveins: 849 - { reg: '$a0', virtual-reg: '' } 850frameInfo: 851 isFrameAddressTaken: false 852 isReturnAddressTaken: false 853 hasStackMap: false 854 hasPatchPoint: false 855 stackSize: 0 856 offsetAdjustment: 0 857 maxAlignment: 1 858 adjustsStack: false 859 hasCalls: false 860 stackProtector: '' 861 maxCallFrameSize: 0 862 hasOpaqueSPAdjustment: false 863 hasVAStart: false 864 hasMustTailInVarArgFunc: false 865 localFrameSize: 0 866 savePoint: '' 867 restorePoint: '' 868fixedStack: 869stack: 870constants: 871body: | 872 ; R6-LABEL: name: expand_BLTUC 873 ; R6: bb.0 (%ir-block.0): 874 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 875 ; R6: renamable $at = ANDi killed renamable $a0, 1 876 ; R6: BGEUC $at, $zero, %bb.2, implicit-def $at 877 ; R6: bb.1 (%ir-block.0): 878 ; R6: successors: %bb.3(0x80000000) 879 ; R6: BC %bb.3 880 ; R6: bb.2.iftrue: 881 ; R6: successors: %bb.3(0x80000000) 882 ; R6: INLINEASM &".space 131068", 1 883 ; R6: bb.3.tail: 884 ; R6: JIC undef $ra, 0, implicit-def $at 885 ; PIC-LABEL: name: expand_BLTUC 886 ; PIC: bb.0 (%ir-block.0): 887 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 888 ; PIC: renamable $at = ANDi killed renamable $a0, 1 889 ; PIC: BGEUC $at, $zero, %bb.3, implicit-def $at 890 ; PIC: bb.1 (%ir-block.0): 891 ; PIC: successors: %bb.2(0x80000000) 892 ; PIC: $sp = ADDiu $sp, -8 893 ; PIC: SW $ra, $sp, 0 894 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 895 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 896 ; PIC: BALC %bb.2, implicit-def $ra 897 ; PIC: bb.2 (%ir-block.0): 898 ; PIC: successors: %bb.4(0x80000000) 899 ; PIC: $at = ADDu $ra, $at 900 ; PIC: $ra = LW $sp, 0 901 ; PIC: $sp = ADDiu $sp, 8 902 ; PIC: JIC $at, 0, implicit-def $at 903 ; PIC: bb.3.iftrue: 904 ; PIC: successors: %bb.4(0x80000000) 905 ; PIC: INLINEASM &".space 131068", 1 906 ; PIC: bb.4.tail: 907 ; PIC: JIC undef $ra, 0, implicit-def $at 908 bb.0 (%ir-block.0): 909 successors: %bb.1(0x40000000), %bb.2(0x40000000) 910 liveins: $a0 911 912 renamable $at = ANDi killed renamable $a0, 1 913 BLTUC killed renamable $at, $zero, %bb.2, implicit-def $at 914 915 bb.1.iftrue: 916 successors: %bb.2(0x80000000) 917 918 INLINEASM &".space 131068", 1 919 920 bb.2.tail: 921 PseudoReturn undef $ra 922 923... 924--- 925 926name: expand_BLTZC 927alignment: 4 928exposesReturnsTwice: false 929legalized: false 930regBankSelected: false 931selected: false 932failedISel: false 933tracksRegLiveness: true 934registers: 935liveins: 936 - { reg: '$a0', virtual-reg: '' } 937frameInfo: 938 isFrameAddressTaken: false 939 isReturnAddressTaken: false 940 hasStackMap: false 941 hasPatchPoint: false 942 stackSize: 0 943 offsetAdjustment: 0 944 maxAlignment: 1 945 adjustsStack: false 946 hasCalls: false 947 stackProtector: '' 948 maxCallFrameSize: 0 949 hasOpaqueSPAdjustment: false 950 hasVAStart: false 951 hasMustTailInVarArgFunc: false 952 localFrameSize: 0 953 savePoint: '' 954 restorePoint: '' 955fixedStack: 956stack: 957constants: 958body: | 959 ; R6-LABEL: name: expand_BLTZC 960 ; R6: bb.0 (%ir-block.0): 961 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 962 ; R6: renamable $at = ANDi killed renamable $a0, 1 963 ; R6: BGEZC $at, %bb.2, implicit-def $at 964 ; R6: bb.1 (%ir-block.0): 965 ; R6: successors: %bb.3(0x80000000) 966 ; R6: BC %bb.3 967 ; R6: bb.2.iftrue: 968 ; R6: successors: %bb.3(0x80000000) 969 ; R6: INLINEASM &".space 131068", 1 970 ; R6: bb.3.tail: 971 ; R6: JIC undef $ra, 0, implicit-def $at 972 ; PIC-LABEL: name: expand_BLTZC 973 ; PIC: bb.0 (%ir-block.0): 974 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 975 ; PIC: renamable $at = ANDi killed renamable $a0, 1 976 ; PIC: BGEZC $at, %bb.3, implicit-def $at 977 ; PIC: bb.1 (%ir-block.0): 978 ; PIC: successors: %bb.2(0x80000000) 979 ; PIC: $sp = ADDiu $sp, -8 980 ; PIC: SW $ra, $sp, 0 981 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 982 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 983 ; PIC: BALC %bb.2, implicit-def $ra 984 ; PIC: bb.2 (%ir-block.0): 985 ; PIC: successors: %bb.4(0x80000000) 986 ; PIC: $at = ADDu $ra, $at 987 ; PIC: $ra = LW $sp, 0 988 ; PIC: $sp = ADDiu $sp, 8 989 ; PIC: JIC $at, 0, implicit-def $at 990 ; PIC: bb.3.iftrue: 991 ; PIC: successors: %bb.4(0x80000000) 992 ; PIC: INLINEASM &".space 131068", 1 993 ; PIC: bb.4.tail: 994 ; PIC: JIC undef $ra, 0, implicit-def $at 995 bb.0 (%ir-block.0): 996 successors: %bb.1(0x40000000), %bb.2(0x40000000) 997 liveins: $a0 998 999 renamable $at = ANDi killed renamable $a0, 1 1000 BLTZC killed renamable $at, %bb.2, implicit-def $at 1001 1002 bb.1.iftrue: 1003 successors: %bb.2(0x80000000) 1004 1005 INLINEASM &".space 131068", 1 1006 1007 bb.2.tail: 1008 PseudoReturn undef $ra 1009 1010... 1011--- 1012 1013name: expand_BEQZC 1014alignment: 4 1015exposesReturnsTwice: false 1016legalized: false 1017regBankSelected: false 1018selected: false 1019failedISel: false 1020tracksRegLiveness: true 1021registers: 1022liveins: 1023 - { reg: '$a0', virtual-reg: '' } 1024frameInfo: 1025 isFrameAddressTaken: false 1026 isReturnAddressTaken: false 1027 hasStackMap: false 1028 hasPatchPoint: false 1029 stackSize: 0 1030 offsetAdjustment: 0 1031 maxAlignment: 1 1032 adjustsStack: false 1033 hasCalls: false 1034 stackProtector: '' 1035 maxCallFrameSize: 0 1036 hasOpaqueSPAdjustment: false 1037 hasVAStart: false 1038 hasMustTailInVarArgFunc: false 1039 localFrameSize: 0 1040 savePoint: '' 1041 restorePoint: '' 1042fixedStack: 1043stack: 1044constants: 1045body: | 1046 ; R6-LABEL: name: expand_BEQZC 1047 ; R6: bb.0 (%ir-block.0): 1048 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 1049 ; R6: renamable $at = ANDi killed renamable $a0, 1 1050 ; R6: BNEZC $at, %bb.2, implicit-def $at 1051 ; R6: bb.1 (%ir-block.0): 1052 ; R6: successors: %bb.3(0x80000000) 1053 ; R6: BC %bb.3 1054 ; R6: bb.2.iftrue: 1055 ; R6: successors: %bb.3(0x80000000) 1056 ; R6: INLINEASM &".space 8388608", 1 1057 ; R6: bb.3.tail: 1058 ; R6: JIC undef $ra, 0, implicit-def $at 1059 ; PIC-LABEL: name: expand_BEQZC 1060 ; PIC: bb.0 (%ir-block.0): 1061 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 1062 ; PIC: renamable $at = ANDi killed renamable $a0, 1 1063 ; PIC: BNEZC $at, %bb.3, implicit-def $at 1064 ; PIC: bb.1 (%ir-block.0): 1065 ; PIC: successors: %bb.2(0x80000000) 1066 ; PIC: $sp = ADDiu $sp, -8 1067 ; PIC: SW $ra, $sp, 0 1068 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 1069 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 1070 ; PIC: BALC %bb.2, implicit-def $ra 1071 ; PIC: bb.2 (%ir-block.0): 1072 ; PIC: successors: %bb.4(0x80000000) 1073 ; PIC: $at = ADDu $ra, $at 1074 ; PIC: $ra = LW $sp, 0 1075 ; PIC: $sp = ADDiu $sp, 8 1076 ; PIC: JIC $at, 0, implicit-def $at 1077 ; PIC: bb.3.iftrue: 1078 ; PIC: successors: %bb.4(0x80000000) 1079 ; PIC: INLINEASM &".space 8388608", 1 1080 ; PIC: bb.4.tail: 1081 ; PIC: JIC undef $ra, 0, implicit-def $at 1082 bb.0 (%ir-block.0): 1083 successors: %bb.1(0x40000000), %bb.2(0x40000000) 1084 liveins: $a0 1085 1086 renamable $at = ANDi killed renamable $a0, 1 1087 BEQZC killed renamable $at, %bb.2, implicit-def $at 1088 1089 bb.1.iftrue: 1090 successors: %bb.2(0x80000000) 1091 1092 INLINEASM &".space 8388608", 1 1093 1094 bb.2.tail: 1095 PseudoReturn undef $ra 1096 1097... 1098--- 1099 1100name: expand_BNEZC 1101alignment: 4 1102exposesReturnsTwice: false 1103legalized: false 1104regBankSelected: false 1105selected: false 1106failedISel: false 1107tracksRegLiveness: true 1108registers: 1109liveins: 1110 - { reg: '$a0', virtual-reg: '' } 1111frameInfo: 1112 isFrameAddressTaken: false 1113 isReturnAddressTaken: false 1114 hasStackMap: false 1115 hasPatchPoint: false 1116 stackSize: 0 1117 offsetAdjustment: 0 1118 maxAlignment: 1 1119 adjustsStack: false 1120 hasCalls: false 1121 stackProtector: '' 1122 maxCallFrameSize: 0 1123 hasOpaqueSPAdjustment: false 1124 hasVAStart: false 1125 hasMustTailInVarArgFunc: false 1126 localFrameSize: 0 1127 savePoint: '' 1128 restorePoint: '' 1129fixedStack: 1130stack: 1131constants: 1132body: | 1133 ; R6-LABEL: name: expand_BNEZC 1134 ; R6: bb.0 (%ir-block.0): 1135 ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000) 1136 ; R6: renamable $at = ANDi killed renamable $a0, 1 1137 ; R6: BEQZC $at, %bb.2, implicit-def $at 1138 ; R6: bb.1 (%ir-block.0): 1139 ; R6: successors: %bb.3(0x80000000) 1140 ; R6: BC %bb.3 1141 ; R6: bb.2.iftrue: 1142 ; R6: successors: %bb.3(0x80000000) 1143 ; R6: INLINEASM &".space 8388608", 1 1144 ; R6: bb.3.tail: 1145 ; R6: JIC undef $ra, 0, implicit-def $at 1146 ; PIC-LABEL: name: expand_BNEZC 1147 ; PIC: bb.0 (%ir-block.0): 1148 ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000) 1149 ; PIC: renamable $at = ANDi killed renamable $a0, 1 1150 ; PIC: BEQZC $at, %bb.3, implicit-def $at 1151 ; PIC: bb.1 (%ir-block.0): 1152 ; PIC: successors: %bb.2(0x80000000) 1153 ; PIC: $sp = ADDiu $sp, -8 1154 ; PIC: SW $ra, $sp, 0 1155 ; PIC: $at = LONG_BRANCH_LUi target-flags(mips-abs-hi) %bb.4, %bb.2 1156 ; PIC: $at = LONG_BRANCH_ADDiu $at, target-flags(mips-abs-lo) %bb.4, %bb.2 1157 ; PIC: BALC %bb.2, implicit-def $ra 1158 ; PIC: bb.2 (%ir-block.0): 1159 ; PIC: successors: %bb.4(0x80000000) 1160 ; PIC: $at = ADDu $ra, $at 1161 ; PIC: $ra = LW $sp, 0 1162 ; PIC: $sp = ADDiu $sp, 8 1163 ; PIC: JIC $at, 0, implicit-def $at 1164 ; PIC: bb.3.iftrue: 1165 ; PIC: successors: %bb.4(0x80000000) 1166 ; PIC: INLINEASM &".space 8388608", 1 1167 ; PIC: bb.4.tail: 1168 ; PIC: JIC undef $ra, 0, implicit-def $at 1169 bb.0 (%ir-block.0): 1170 successors: %bb.1(0x40000000), %bb.2(0x40000000) 1171 liveins: $a0 1172 1173 renamable $at = ANDi killed renamable $a0, 1 1174 BNEZC killed renamable $at, %bb.2, implicit-def $at 1175 1176 bb.1.iftrue: 1177 successors: %bb.2(0x80000000) 1178 1179 INLINEASM &".space 8388608", 1 1180 1181 bb.2.tail: 1182 PseudoReturn undef $ra 1183 1184... 1185