summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/longbranch
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@mips.com>2018-05-16 10:03:05 +0000
committerSimon Dardis <simon.dardis@mips.com>2018-05-16 10:03:05 +0000
commit5cf9de4b727b9311d5883fa682b1bd00b50647a8 (patch)
treed25a402aefed160fef4ccbcd0e8d66f76e5a181c /llvm/test/CodeGen/Mips/longbranch
parentcaa163ef6a753e4306a057f8f508f5aea299dba8 (diff)
downloadbcm5719-llvm-5cf9de4b727b9311d5883fa682b1bd00b50647a8.tar.gz
bcm5719-llvm-5cf9de4b727b9311d5883fa682b1bd00b50647a8.zip
[mips] Add support for isBranchOffsetInRange and use it for MipsLongBranch
Add support for this target hook, covering MIPS, microMIPS and MIPSR6, along with some tests. Also add missing getOppositeBranchOpc() cases exposed by the tests. Reviewers: atanasyan, abeserminji, smaksimovic Differential Revision: https://reviews.llvm.org/D46794 llvm-svn: 332446
Diffstat (limited to 'llvm/test/CodeGen/Mips/longbranch')
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromips.mir215
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromipsr6.mir219
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mips.mir242
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mipsr6.mir236
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int-microMIPS.mir848
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int-micromipsr6.mir1184
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64.mir692
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64r6.mir1286
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mipsr6.mir1184
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-int.mir668
-rw-r--r--llvm/test/CodeGen/Mips/longbranch/branch-limits-msa.mir1355
11 files changed, 8129 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromips.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromips.mir
new file mode 100644
index 00000000000..4a76df3d71c
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromips.mir
@@ -0,0 +1,215 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-mti-linux-gnu -mattr=+micromips %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MM
+# RUN: llc -mtriple=mips-mti-linux-gnu -mattr=+micromips %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+
+ define i32 @a(double %a, double %b) {
+ entry:
+ %cmp = fcmp une double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+ define i32 @b(double %a, double %b) {
+ entry:
+ %cmp = fcmp ueq double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+...
+---
+name: a
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d6', virtual-reg: '' }
+ - { reg: '$d7', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: a
+ ; MM: bb.0.entry:
+ ; MM: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; MM: FCMP_D32_MM killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; MM: BC1F_MM $fcc0, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1.entry:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.if.then:
+ ; MM: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; MM: $v0 = LI16_MM 0
+ ; MM: JRC16_MM undef $ra, implicit killed $v0
+ ; MM: bb.3.return:
+ ; MM: $v0 = LI16_MM 1
+ ; MM: JRC16_MM undef $ra, implicit killed $v0
+ ; PIC-LABEL: name: a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: FCMP_D32_MM killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; PIC: BC1F_MM $fcc0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: $v0 = LI16_MM 0
+ ; PIC: JRC16_MM undef $ra, implicit killed $v0
+ ; PIC: bb.4.return:
+ ; PIC: $v0 = LI16_MM 1
+ ; PIC: JRC16_MM undef $ra, implicit killed $v0
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d6, $d7
+
+ FCMP_D32_MM killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ BC1T_MM killed $fcc0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = LI16_MM 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.2.return:
+ $v0 = LI16_MM 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
+---
+name: b
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d6', virtual-reg: '' }
+ - { reg: '$d7', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: b
+ ; MM: bb.0.entry:
+ ; MM: successors: %bb.2(0x30000000), %bb.1(0x50000000)
+ ; MM: FCMP_D32_MM killed renamable $d6, killed renamable $d7, 19, implicit-def $fcc0
+ ; MM: BC1F_MM killed $fcc0, %bb.1, implicit-def dead $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1.return:
+ ; MM: $v0 = LI16_MM 1
+ ; MM: JRC16_MM undef $ra, implicit killed $v0
+ ; MM: bb.2.if.then:
+ ; MM: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; MM: $v0 = LI16_MM 0
+ ; MM: JRC16_MM undef $ra, implicit killed $v0
+ ; PIC-LABEL: name: b
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.2(0x30000000), %bb.1(0x50000000)
+ ; PIC: FCMP_D32_MM killed renamable $d6, killed renamable $d7, 19, implicit-def $fcc0
+ ; PIC: BC1F_MM killed $fcc0, %bb.1, implicit-def dead $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.return:
+ ; PIC: $v0 = LI16_MM 1
+ ; PIC: JRC16_MM undef $ra, implicit killed $v0
+ ; PIC: bb.2.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: $v0 = LI16_MM 0
+ ; PIC: JRC16_MM undef $ra, implicit killed $v0
+ bb.0.entry:
+ successors: %bb.1(0x30000000), %bb.2(0x50000000)
+ liveins: $d6, $d7
+
+ FCMP_D32_MM killed renamable $d6, killed renamable $d7, 19, implicit-def $fcc0
+ BC1F_MM killed $fcc0, %bb.2, implicit-def dead $at
+
+ bb.2.return:
+ $v0 = LI16_MM 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = LI16_MM 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromipsr6.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromipsr6.mir
new file mode 100644
index 00000000000..25f4a0f72f6
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-micromipsr6.mir
@@ -0,0 +1,219 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -mattr=+micromips %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MM
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -mattr=+micromips %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+
+ define i32 @a(double %a, double %b) {
+ entry:
+ %cmp = fcmp une double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 810680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+ define i32 @b(double %a, double %b) {
+ entry:
+ %cmp = fcmp ueq double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 810680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+...
+---
+name: a
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d12_64', virtual-reg: '' }
+ - { reg: '$d14_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: a
+ ; MM: bb.0.entry:
+ ; MM: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; MM: $f0 = CMP_EQ_D_MMR6 killed $d12_64, killed $d14_64
+ ; MM: BC1EQZC_MMR6 $d0_64, %bb.2, implicit-def $at
+ ; MM: bb.1.entry:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: BC_MMR6 %bb.3
+ ; MM: bb.2.if.then:
+ ; MM: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MM: $v0 = LI16_MM 0
+ ; MM: JRC16_MM undef $ra, implicit $v0
+ ; MM: bb.3.return:
+ ; MM: $v0 = LI16_MM 1
+ ; MM: JRC16_MM undef $ra, implicit $v0
+ ; PIC-LABEL: name: a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: $f0 = CMP_EQ_D_MMR6 killed $d12_64, killed $d14_64
+ ; PIC: BC1EQZC_MMR6 $d0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: $v0 = LI16_MM 0
+ ; PIC: JRC16_MM undef $ra, implicit $v0
+ ; PIC: bb.4.return:
+ ; PIC: $v0 = LI16_MM 1
+ ; PIC: JRC16_MM undef $ra, implicit $v0
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d12_64, $d14_64
+
+ $f0 = CMP_EQ_D_MMR6 killed $d12_64, killed $d14_64
+ BC1NEZC_MMR6 killed $d0_64, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = LI16_MM 0
+ PseudoReturn undef $ra, implicit $v0
+
+ bb.2.return:
+ $v0 = LI16_MM 1
+ PseudoReturn undef $ra, implicit $v0
+
+...
+---
+name: b
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d12_64', virtual-reg: '' }
+ - { reg: '$d14_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: b
+ ; MM: bb.0.entry:
+ ; MM: successors: %bb.2(0x30000000), %bb.1(0x50000000)
+ ; MM: $f0 = CMP_UEQ_D_MMR6 killed $d12_64, killed $d14_64
+ ; MM: BC1NEZC_MMR6 $d0_64, %bb.2, implicit-def $at
+ ; MM: bb.1.entry:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: BC_MMR6 %bb.3
+ ; MM: bb.2.if.then:
+ ; MM: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MM: $v0 = LI16_MM 0
+ ; MM: JRC16_MM undef $ra, implicit $v0
+ ; MM: bb.3.return:
+ ; MM: $v0 = LI16_MM 1
+ ; MM: JRC16_MM undef $ra, implicit $v0
+ ; PIC-LABEL: name: b
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x30000000), %bb.1(0x50000000)
+ ; PIC: $f0 = CMP_UEQ_D_MMR6 killed $d12_64, killed $d14_64
+ ; PIC: BC1NEZC_MMR6 $d0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: $v0 = LI16_MM 0
+ ; PIC: JRC16_MM undef $ra, implicit $v0
+ ; PIC: bb.4.return:
+ ; PIC: $v0 = LI16_MM 1
+ ; PIC: JRC16_MM undef $ra, implicit $v0
+ bb.0.entry:
+ successors: %bb.1(0x30000000), %bb.2(0x50000000)
+ liveins: $d12_64, $d14_64
+
+ $f0 = CMP_UEQ_D_MMR6 killed $d12_64, killed $d14_64
+ BC1EQZC_MMR6 killed $d0_64, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = LI16_MM 0
+ PseudoReturn undef $ra, implicit $v0
+
+ bb.2.return:
+ $v0 = LI16_MM 1
+ PseudoReturn undef $ra, implicit $v0
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mips.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mips.mir
new file mode 100644
index 00000000000..d727ac6005c
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mips.mir
@@ -0,0 +1,242 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MIPS
+# RUN: llc -mtriple=mips-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+# Test the long branch expansion of various branches
+
+--- |
+
+ define i32 @a(double %a, double %b) {
+ entry:
+ %cmp = fcmp une double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+ define i32 @b(double %a, double %b) {
+ entry:
+ %cmp = fcmp une double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then:
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return:
+ ret i32 1
+ }
+
+...
+---
+name: a
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d6', virtual-reg: '' }
+ - { reg: '$d7', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: a
+ ; MIPS: bb.0.entry:
+ ; MIPS: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; MIPS: FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; MIPS: BC1F $fcc0, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1.entry:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.if.then:
+ ; MIPS: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; MIPS: PseudoReturn undef $ra, implicit killed $v0 {
+ ; MIPS: $v0 = ADDiu $zero, 0
+ ; MIPS: }
+ ; MIPS: bb.3.return:
+ ; MIPS: PseudoReturn undef $ra, implicit killed $v0 {
+ ; MIPS: $v0 = ADDiu $zero, 1
+ ; MIPS: }
+ ; PIC-LABEL: name: a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; PIC: BC1F $fcc0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 0
+ ; PIC: }
+ ; PIC: bb.4.return:
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 1
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d6, $d7
+
+ FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ BC1T killed $fcc0, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = ADDiu $zero, 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.2.return:
+ $v0 = ADDiu $zero, 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
+---
+name: b
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d6', virtual-reg: '' }
+ - { reg: '$d7', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: b
+ ; MIPS: bb.0.entry:
+ ; MIPS: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; MIPS: FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; MIPS: BC1T $fcc0, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1.entry:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.if.then:
+ ; MIPS: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; MIPS: PseudoReturn undef $ra, implicit killed $v0 {
+ ; MIPS: $v0 = ADDiu $zero, 0
+ ; MIPS: }
+ ; MIPS: bb.3.return:
+ ; MIPS: PseudoReturn undef $ra, implicit killed $v0 {
+ ; MIPS: $v0 = ADDiu $zero, 1
+ ; MIPS: }
+ ; PIC-LABEL: name: b
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ ; PIC: BC1T $fcc0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 0
+ ; PIC: }
+ ; PIC: bb.4.return:
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 1
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d6, $d7
+
+ FCMP_D32 killed renamable $d6, killed renamable $d7, 2, implicit-def $fcc0
+ BC1F killed $fcc0, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = ADDiu $zero, 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.2.return:
+ $v0 = ADDiu $zero, 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mipsr6.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mipsr6.mir
new file mode 100644
index 00000000000..b9eadc05022
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-fp-mipsr6.mir
@@ -0,0 +1,236 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=R6
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+
+ define i32 @a(double %a, double %b) {
+ entry:
+ %cmp = fcmp une double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then: ; preds = %entry
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return: ; preds = %entry
+ ret i32 1
+ }
+
+ define i32 @b(double %a, double %b) {
+ entry:
+ %cmp = fcmp ueq double %a, %b
+ br i1 %cmp, label %if.then, label %return
+
+ if.then: ; preds = %entry
+ call void asm sideeffect ".space 310680", "~{$1}"()
+ ret i32 0
+
+ return: ; preds = %entry
+ ret i32 1
+ }
+
+
+...
+---
+name: a
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d12_64', virtual-reg: '' }
+ - { reg: '$d14_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: a
+ ; R6: bb.0.entry:
+ ; R6: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; R6: $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ ; R6: BC1NEZ $d0_64, %bb.2 {
+ ; R6: NOP
+ ; R6: }
+ ; R6: bb.1.entry:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.if.then:
+ ; R6: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; R6: PseudoReturn undef $ra, implicit killed $v0 {
+ ; R6: $v0 = ADDiu $zero, 0
+ ; R6: }
+ ; R6: bb.3.return:
+ ; R6: PseudoReturn undef $ra, implicit killed $v0 {
+ ; R6: $v0 = ADDiu $zero, 1
+ ; R6: }
+ ; PIC-LABEL: name: a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ ; PIC: BC1NEZ $d0_64, %bb.3 {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 0
+ ; PIC: }
+ ; PIC: bb.4.return:
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 1
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d12_64, $d14_64
+
+ $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ BC1EQZ killed $d0_64, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = ADDiu $zero, 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.2.return:
+ $v0 = ADDiu $zero, 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
+---
+name: b
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$d12_64', virtual-reg: '' }
+ - { reg: '$d14_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: b
+ ; R6: bb.0.entry:
+ ; R6: successors: %bb.2(0x50000000), %bb.1(0x30000000)
+ ; R6: $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ ; R6: BC1EQZ $d0_64, %bb.2 {
+ ; R6: NOP
+ ; R6: }
+ ; R6: bb.1.entry:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.if.then:
+ ; R6: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; R6: PseudoReturn undef $ra, implicit killed $v0 {
+ ; R6: $v0 = ADDiu $zero, 0
+ ; R6: }
+ ; R6: bb.3.return:
+ ; R6: PseudoReturn undef $ra, implicit killed $v0 {
+ ; R6: $v0 = ADDiu $zero, 1
+ ; R6: }
+ ; PIC-LABEL: name: b
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x50000000), %bb.1(0x30000000)
+ ; PIC: $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ ; PIC: BC1EQZ $d0_64, %bb.3 {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 0
+ ; PIC: }
+ ; PIC: bb.4.return:
+ ; PIC: PseudoReturn undef $ra, implicit killed $v0 {
+ ; PIC: $v0 = ADDiu $zero, 1
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x50000000), %bb.2(0x30000000)
+ liveins: $d12_64, $d14_64
+
+ $f0 = CMP_EQ_D killed $d12_64, killed $d14_64
+ BC1NEZ killed $d0_64, %bb.2, implicit-def $at
+
+ bb.1.if.then:
+ INLINEASM &".space 310680", 1, 12, implicit-def dead early-clobber $at
+ $v0 = ADDiu $zero, 0
+ PseudoReturn undef $ra, implicit killed $v0
+
+ bb.2.return:
+ $v0 = ADDiu $zero, 1
+ PseudoReturn undef $ra, implicit killed $v0
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-microMIPS.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-microMIPS.mir
new file mode 100644
index 00000000000..fa8da82f7d2
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-microMIPS.mir
@@ -0,0 +1,848 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-mti-linux-gnu -mattr=+micromips -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MM
+# RUN: llc -mtriple=mips-mti-linux-gnu -mattr=+micromips -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define void @expand_BEQ_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEZ_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGTZ_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLEZ_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTZ_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNE_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BEQZ16_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNEZ16_MM(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+...
+---
+
+name: expand_BEQ_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BEQ_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BNEZC_MM $at, %bb.2, implicit-def $at
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BEQ_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNEZC_MM $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQ_MM killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEZ_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BGEZ_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BLTZ_MM $at, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGEZ_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTZ_MM $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEZ_MM killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGTZ_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BGTZ_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BLEZ_MM $at, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGTZ_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLEZ_MM $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGTZ_MM killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLEZ_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BLEZ_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BGTZ_MM $at, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLEZ_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGTZ_MM $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLEZ_MM killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTZ_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BLTZ_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BGEZ_MM $at, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLTZ_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEZ_MM $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTZ_MM killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNE_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BNE_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $at = ANDi killed renamable $a0, 1
+ ; MM: BEQZC_MM $at, %bb.2, implicit-def $at
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BNE_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQZC_MM $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNE_MM killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BEQZ16_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BEQZ16_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $v0 = ANDi killed renamable $a0, 1
+ ; MM: BNEZ16_MM $v0, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BEQZ16_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $v0 = ANDi killed renamable $a0, 1
+ ; PIC: BNEZ16_MM $v0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $v0 = ANDi killed renamable $a0, 1
+ BEQZ16_MM killed renamable $v0, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNEZ16_MM
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MM-LABEL: name: expand_BNEZ16_MM
+ ; MM: bb.0 (%ir-block.0):
+ ; MM: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MM: renamable $v0 = ANDi killed renamable $a0, 1
+ ; MM: BEQZ16_MM $v0, %bb.2, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.1 (%ir-block.0):
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: J %bb.3, implicit-def $at {
+ ; MM: NOP
+ ; MM: }
+ ; MM: bb.2.iftrue:
+ ; MM: successors: %bb.3(0x80000000)
+ ; MM: INLINEASM &".space 131068", 1
+ ; MM: bb.3.tail:
+ ; MM: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BNEZ16_MM
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $v0 = ANDi killed renamable $a0, 1
+ ; PIC: BEQZ16_MM $v0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR_MM %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $v0 = ANDi killed renamable $a0, 1
+ BNEZ16_MM killed renamable $v0, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-micromipsr6.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-micromipsr6.mir
new file mode 100644
index 00000000000..014c60769bd
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-micromipsr6.mir
@@ -0,0 +1,1184 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -mattr=+micromips -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MMR6
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -mattr=+micromips -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define void @expand_BEQC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNEC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEUC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGTZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLEZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTUC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BEQZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 8388608", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNEZC_MMR6(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 8388608", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+...
+---
+
+name: expand_BEQC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BEQC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BNEC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BEQC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNEC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNEC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BNEC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BEQC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BNEC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNEC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BGEC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BLTC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGEC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEUC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BGEUC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BLTUC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGEUC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTUC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEUC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BGEZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BLTZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGEZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGTZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BGTZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BLEZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BGTZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLEZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGTZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLEZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BLEZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BGTZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLEZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGTZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLEZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BLTC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BGEC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLTC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTUC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BLTUC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BGEUC_MMR6 $at, $zero, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLTUC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEUC_MMR6 $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTUC_MMR6 killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BLTZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BGEZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 131068", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BLTZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BEQZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BEQZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BNEZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 8388608", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BEQZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNEZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 8388608", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 8388608", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNEZC_MMR6
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MMR6-LABEL: name: expand_BNEZC_MMR6
+ ; MMR6: bb.0 (%ir-block.0):
+ ; MMR6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MMR6: renamable $at = ANDi killed renamable $a0, 1
+ ; MMR6: BEQZC_MMR6 $at, %bb.2, implicit-def $at
+ ; MMR6: bb.1 (%ir-block.0):
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: BC_MMR6 %bb.3
+ ; MMR6: bb.2.iftrue:
+ ; MMR6: successors: %bb.3(0x80000000)
+ ; MMR6: INLINEASM &".space 8388608", 1
+ ; MMR6: bb.3.tail:
+ ; MMR6: JRC16_MM undef $ra
+ ; PIC-LABEL: name: expand_BNEZC_MMR6
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQZC_MMR6 $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC_MMR6 %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC_MMR6 $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 8388608", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JRC16_MM undef $ra
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNEZC_MMR6 killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 8388608", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64.mir
new file mode 100644
index 00000000000..6f336a5b6a7
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64.mir
@@ -0,0 +1,692 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips64-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MIPS64
+# RUN: llc -mtriple=mips64-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define i64 @expand_BEQ64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BNE64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGEZ64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGTZ64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLEZ64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLTZ64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+...
+---
+
+name: expand_BEQ64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BEQ64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BNE64 $a0_64, $zero_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BEQ64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BNE64 $a0_64, $zero_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BEQ64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BNE64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BNE64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BEQ64 $a0_64, $zero_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BNE64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BEQ64 $a0_64, $zero_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BNE64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGEZ64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGEZ64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLTZ64 $a0_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGEZ64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLTZ64 $a0_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGEZ64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGTZ64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGTZ64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLEZ64 $a0_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGTZ64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLEZ64 $a0_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGTZ64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLEZ64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLEZ64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGTZ64 $a0_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLEZ64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGTZ64 $a0_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLEZ64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLTZ64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLTZ64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGEZ64 $a0_64, %bb.2, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 131068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLTZ64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGEZ64 $a0_64, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLTZ64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 131068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64r6.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64r6.mir
new file mode 100644
index 00000000000..b08fa63dd4a
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mips64r6.mir
@@ -0,0 +1,1286 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips64-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MIPS64
+# RUN: llc -mtriple=mips64-mti-linux-gnu %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define i64 @expand_BNEZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BEQZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BNEC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BEQC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLTC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLTUC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGEC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGEUC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLEZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BLTZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGEZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+ define i64 @expand_BGTZC64(i64 %a, i64 %b) {
+ %cmp = icmp eq i64 %a, %b
+ br i1 %cmp, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 831068", ""()
+ ret i64 1
+
+ tail:
+ ret i64 0
+ }
+
+...
+---
+
+name: expand_BNEZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BNEZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; MIPS64: BNEZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.2.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BNEZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; PIC: BNEZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+ ; PIC: bb.1.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.2.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BNEZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BEQZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BEQZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; MIPS64: BEQZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.2.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BEQZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ ; PIC: BEQZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+ ; PIC: bb.1.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.2.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BEQZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BNEC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BNEC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BEQC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BNEC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BEQC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BNEC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BEQC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BEQC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BNEC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BEQC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BNEC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BEQC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLTC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLTC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGEC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLTC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGEC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLTC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLTUC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLTUC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGEUC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLTUC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGEUC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLTUC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGEC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGEC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLTC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGEC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLTC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGEC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGEUC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGEUC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLTUC64 $a0_64, $zero_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGEUC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLTUC64 $a0_64, $zero_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGEUC64 killed renamable $a0_64, $zero_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLEZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLEZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGTZC64 $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLEZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGTZC64 $a0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLEZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BLTZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BLTZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BGEZC64 $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BLTZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BGEZC64 $a0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BLTZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGEZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGEZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLTZC64 $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGEZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLTZC64 $a0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGEZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
+---
+
+name: expand_BGTZC64
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS64-LABEL: name: expand_BGTZC64
+ ; MIPS64: bb.0 (%ir-block.0):
+ ; MIPS64: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS64: BLEZC64 $a0_64, %bb.2, implicit-def $at
+ ; MIPS64: bb.1 (%ir-block.0):
+ ; MIPS64: successors: %bb.3(0x80000000)
+ ; MIPS64: J %bb.3, implicit-def $at {
+ ; MIPS64: NOP
+ ; MIPS64: }
+ ; MIPS64: bb.2.iftrue:
+ ; MIPS64: INLINEASM &".space 831068", 1
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 1
+ ; MIPS64: }
+ ; MIPS64: bb.3.tail:
+ ; MIPS64: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; MIPS64: $v0_64 = DADDiu $zero_64, 0
+ ; MIPS64: }
+ ; PIC-LABEL: name: expand_BGTZC64
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: BLEZC64 $a0_64, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: INLINEASM &".space 831068", 1
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 1
+ ; PIC: }
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0_64 {
+ ; PIC: $v0_64 = DADDiu $zero_64, 0
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64
+
+ BGTZC64 killed renamable $a0_64, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ INLINEASM &".space 831068", 1
+ $v0_64 = DADDiu $zero_64, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+ bb.2.tail:
+ $v0_64 = DADDiu $zero_64, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0_64
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mipsr6.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mipsr6.mir
new file mode 100644
index 00000000000..913d0dce458
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int-mipsr6.mir
@@ -0,0 +1,1184 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=R6
+# RUN: llc -mtriple=mips-img-linux-gnu -mcpu=mips32r6 -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define void @expand_BEQC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNEC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEUC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGTZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLEZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTUC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BEQZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 8388608", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNEZC(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 8388608", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+...
+---
+
+name: expand_BEQC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BEQC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BNEC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BEQC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNEC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNEC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BNEC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BEQC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BNEC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNEC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BGEC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BLTC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BGEC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEUC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BGEUC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BLTUC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BGEUC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTUC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEUC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BGEZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BLTZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BGEZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGTZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BGTZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BLEZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BGTZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLEZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGTZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLEZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BLEZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BGTZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BLEZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGTZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLEZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BLTC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BGEC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BLTC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTUC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BLTUC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BGEUC $at, $zero, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BLTUC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEUC $at, $zero, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTUC killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BLTZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BGEZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 131068", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BLTZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BEQZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BEQZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BNEZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 8388608", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BEQZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNEZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 8388608", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 8388608", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNEZC
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; R6-LABEL: name: expand_BNEZC
+ ; R6: bb.0 (%ir-block.0):
+ ; R6: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; R6: renamable $at = ANDi killed renamable $a0, 1
+ ; R6: BEQZC $at, %bb.2, implicit-def $at
+ ; R6: bb.1 (%ir-block.0):
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: BC %bb.3
+ ; R6: bb.2.iftrue:
+ ; R6: successors: %bb.3(0x80000000)
+ ; R6: INLINEASM &".space 8388608", 1
+ ; R6: bb.3.tail:
+ ; R6: JIC undef $ra, 0, implicit-def $at
+ ; PIC-LABEL: name: expand_BNEZC
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQZC $at, %bb.3, implicit-def $at
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: BALC %bb.2, implicit-def $ra
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: JIC $at, 0, implicit-def $at
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 8388608", 1
+ ; PIC: bb.4.tail:
+ ; PIC: JIC undef $ra, 0, implicit-def $at
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNEZC killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 8388608", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-int.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int.mir
new file mode 100644
index 00000000000..c727df93e3a
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-int.mir
@@ -0,0 +1,668 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips-mti-linux-gnu -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MIPS
+# RUN: llc -mtriple=mips-mti-linux-gnu -o - %s -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+--- |
+ define void @expand_BEQ(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGEZ(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BGTZ(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLEZ(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BLTZ(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+ define void @expand_BNE(i1 %a) {
+ br i1 %a, label %iftrue, label %tail
+
+ iftrue:
+ call void asm sideeffect ".space 131068", ""()
+ br label %tail
+
+ tail:
+ ret void
+ }
+
+...
+---
+
+name: expand_BEQ
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BEQ
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BNE $at, $zero, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BEQ
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BNE $at, $zero, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BEQ killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGEZ
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BGEZ
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BLTZ $at, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BGEZ
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLTZ $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGEZ killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BGTZ
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BGTZ
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BLEZ $at, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BGTZ
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BLEZ $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BGTZ killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLEZ
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BLEZ
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BGTZ $at, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BLEZ
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGTZ $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLEZ killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BLTZ
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BLTZ
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BGEZ $at, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BLTZ
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BGEZ $at, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BLTZ killed renamable $at, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
+---
+
+name: expand_BNE
+alignment: 2
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MIPS-LABEL: name: expand_BNE
+ ; MIPS: bb.0 (%ir-block.0):
+ ; MIPS: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MIPS: renamable $at = ANDi killed renamable $a0, 1
+ ; MIPS: BEQ $at, $zero, %bb.2, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.1 (%ir-block.0):
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: J %bb.3, implicit-def $at {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; MIPS: bb.2.iftrue:
+ ; MIPS: successors: %bb.3(0x80000000)
+ ; MIPS: INLINEASM &".space 131068", 1
+ ; MIPS: bb.3.tail:
+ ; MIPS: PseudoReturn undef $ra {
+ ; MIPS: NOP
+ ; MIPS: }
+ ; PIC-LABEL: name: expand_BNE
+ ; PIC: bb.0 (%ir-block.0):
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $at = ANDi killed renamable $a0, 1
+ ; PIC: BEQ $at, $zero, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1 (%ir-block.0):
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp = ADDiu $sp, -8
+ ; PIC: SW $ra, $sp, 0
+ ; PIC: $at = LONG_BRANCH_LUi %bb.4, %bb.2
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at = LONG_BRANCH_ADDiu $at, %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2 (%ir-block.0):
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at = ADDu $ra, $at
+ ; PIC: $ra = LW $sp, 0
+ ; PIC: JR $at {
+ ; PIC: $sp = ADDiu $sp, 8
+ ; PIC: }
+ ; PIC: bb.3.iftrue:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: INLINEASM &".space 131068", 1
+ ; PIC: bb.4.tail:
+ ; PIC: PseudoReturn undef $ra {
+ ; PIC: NOP
+ ; PIC: }
+ bb.0 (%ir-block.0):
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0
+
+ renamable $at = ANDi killed renamable $a0, 1
+ BNE killed renamable $at, $zero, %bb.2, implicit-def $at
+
+ bb.1.iftrue:
+ successors: %bb.2(0x80000000)
+
+ INLINEASM &".space 131068", 1
+
+ bb.2.tail:
+ PseudoReturn undef $ra
+
+...
diff --git a/llvm/test/CodeGen/Mips/longbranch/branch-limits-msa.mir b/llvm/test/CodeGen/Mips/longbranch/branch-limits-msa.mir
new file mode 100644
index 00000000000..1fd7b4995de
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/longbranch/branch-limits-msa.mir
@@ -0,0 +1,1355 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=mips64-mti-linux-gnu -mcpu=mips64r5 -mattr=+fp64,+msa %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch | FileCheck %s --check-prefix=MSA
+# RUN: llc -mtriple=mips64-mti-linux-gnu -mcpu=mips64r5 -mattr=+fp64,+msa %s -o - -start-before mips-delay-slot-filler -stop-after mips-long-branch -relocation-model=pic | FileCheck %s --check-prefix=PIC
+
+# Test the long branch expansion of various branches
+
+
+
+--- |
+
+ define i32 @_Z4bz_8Dv16_a(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <8 x i8>
+ %d.0.vec.expand = shufflevector <8 x i8> %0, <8 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <8 x i8>
+ %d.8.vec.expand = shufflevector <8 x i8> %1, <8 x i8> undef, <16 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ %d.8.vecblend = shufflevector <16 x i8> %d.8.vec.expand, <16 x i8> %d.0.vec.expand, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+ %2 = tail call i32 @llvm.mips.bz.b(<16 x i8> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bz.b(<16 x i8>)
+
+ define i32 @_Z5bz_16Dv8_s(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <4 x i16>
+ %d.0.vec.expand = shufflevector <4 x i16> %0, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <4 x i16>
+ %d.8.vec.expand = shufflevector <4 x i16> %1, <4 x i16> undef, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3>
+ %d.8.vecblend = shufflevector <8 x i16> %d.8.vec.expand, <8 x i16> %d.0.vec.expand, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 4, i32 5, i32 6, i32 7>
+ %2 = tail call i32 @llvm.mips.bz.h(<8 x i16> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bz.h(<8 x i16>)
+
+ define i32 @_Z5bz_32Dv4_i(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <2 x i32>
+ %d.0.vec.expand = shufflevector <2 x i32> %0, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <2 x i32>
+ %d.8.vec.expand = shufflevector <2 x i32> %1, <2 x i32> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 1>
+ %d.8.vecblend = shufflevector <4 x i32> %d.8.vec.expand, <4 x i32> %d.0.vec.expand, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
+ %2 = tail call i32 @llvm.mips.bz.w(<4 x i32> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bz.w(<4 x i32>)
+
+ define i32 @_Z5bz_64Dv2_x(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %d.0.vec.insert = insertelement <2 x i64> undef, i64 %d.coerce0, i32 0
+ %d.8.vec.insert = insertelement <2 x i64> %d.0.vec.insert, i64 %d.coerce1, i32 1
+ %0 = tail call i32 @llvm.mips.bz.d(<2 x i64> %d.8.vec.insert)
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bz.d(<2 x i64>)
+
+ define i32 @_Z5bz_64_vDv2_x(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %d.0.vec.insert = insertelement <2 x i64> undef, i64 %d.coerce0, i32 0
+ %d.8.vec.insert = insertelement <2 x i64> %d.0.vec.insert, i64 %d.coerce1, i32 1
+ %d.16.vec.insert = bitcast <2 x i64> %d.8.vec.insert to <16 x i8>
+ %0 = tail call i32 @llvm.mips.bz.v(<16 x i8> %d.16.vec.insert)
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bz.v(<16 x i8>)
+
+ define i32 @_Z5bnz_8Dv16_a(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <8 x i8>
+ %d.0.vec.expand = shufflevector <8 x i8> %0, <8 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <8 x i8>
+ %d.8.vec.expand = shufflevector <8 x i8> %1, <8 x i8> undef, <16 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
+ %d.8.vecblend = shufflevector <16 x i8> %d.8.vec.expand, <16 x i8> %d.0.vec.expand, <16 x i32> <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+ %2 = tail call i32 @llvm.mips.bnz.b(<16 x i8> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bnz.b(<16 x i8>)
+
+ define i32 @_Z6bnz_16Dv8_s(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <4 x i16>
+ %d.0.vec.expand = shufflevector <4 x i16> %0, <4 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <4 x i16>
+ %d.8.vec.expand = shufflevector <4 x i16> %1, <4 x i16> undef, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 0, i32 1, i32 2, i32 3>
+ %d.8.vecblend = shufflevector <8 x i16> %d.8.vec.expand, <8 x i16> %d.0.vec.expand, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 4, i32 5, i32 6, i32 7>
+ %2 = tail call i32 @llvm.mips.bnz.h(<8 x i16> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bnz.h(<8 x i16>)
+
+ define i32 @_Z6bnz_32Dv4_i(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %0 = bitcast i64 %d.coerce0 to <2 x i32>
+ %d.0.vec.expand = shufflevector <2 x i32> %0, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
+ %1 = bitcast i64 %d.coerce1 to <2 x i32>
+ %d.8.vec.expand = shufflevector <2 x i32> %1, <2 x i32> undef, <4 x i32> <i32 undef, i32 undef, i32 0, i32 1>
+ %d.8.vecblend = shufflevector <4 x i32> %d.8.vec.expand, <4 x i32> %d.0.vec.expand, <4 x i32> <i32 4, i32 5, i32 2, i32 3>
+ %2 = tail call i32 @llvm.mips.bnz.w(<4 x i32> %d.8.vecblend)
+ %tobool = icmp eq i32 %2, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bnz.w(<4 x i32>)
+
+ define i32 @_Z6bnz_64Dv2_x(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %d.0.vec.insert = insertelement <2 x i64> undef, i64 %d.coerce0, i32 0
+ %d.8.vec.insert = insertelement <2 x i64> %d.0.vec.insert, i64 %d.coerce1, i32 1
+ %0 = tail call i32 @llvm.mips.bnz.d(<2 x i64> %d.8.vec.insert)
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bnz.d(<2 x i64>)
+
+ define i32 @_Z6bnz_64_vDv2_x(i64 inreg %d.coerce0, i64 inreg %d.coerce1) {
+ entry:
+ %d.0.vec.insert = insertelement <2 x i64> undef, i64 %d.coerce0, i32 0
+ %d.8.vec.insert = insertelement <2 x i64> %d.0.vec.insert, i64 %d.coerce1, i32 1
+ %d.16.vec.insert = bitcast <2 x i64> %d.8.vec.insert to <16 x i8>
+ %0 = tail call i32 @llvm.mips.bnz.v(<16 x i8> %d.16.vec.insert)
+ %tobool = icmp eq i32 %0, 0
+ br i1 %tobool, label %return, label %if.then
+
+ if.then:
+ tail call void asm sideeffect ".space 810680", "~{$1}"()
+ br label %return
+
+ return:
+ %retval.0 = phi i32 [ 1, %if.then ], [ 0, %entry ]
+ ret i32 %retval.0
+ }
+
+ declare i32 @llvm.mips.bnz.v(<16 x i8>)
+
+...
+---
+name: _Z4bz_8Dv16_a
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z4bz_8Dv16_a
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_B killed renamable $w0, 27
+ ; MSA: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; MSA: BNZ_B $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z4bz_8Dv16_a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_B killed renamable $w0, 27
+ ; PIC: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; PIC: BNZ_B $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_B killed renamable $w0, 27
+ renamable $w0 = SHF_W killed renamable $w0, 177
+ BZ_B killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z5bz_16Dv8_s
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z5bz_16Dv8_s
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_H killed renamable $w0, 27
+ ; MSA: BNZ_H $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z5bz_16Dv8_s
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_H killed renamable $w0, 27
+ ; PIC: BNZ_H $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_H killed renamable $w0, 27
+ BZ_H killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z5bz_32Dv4_i
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z5bz_32Dv4_i
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; MSA: BNZ_W $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z5bz_32Dv4_i
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; PIC: BNZ_W $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_W killed renamable $w0, 177
+ BZ_W killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z5bz_64Dv2_x
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z5bz_64Dv2_x
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: BNZ_D $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z5bz_64Dv2_x
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: BNZ_D $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ BZ_D killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z5bz_64_vDv2_x
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z5bz_64_vDv2_x
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: BNZ_V $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z5bz_64_vDv2_x
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: BNZ_V $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ BZ_V killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z5bnz_8Dv16_a
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z5bnz_8Dv16_a
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_B killed renamable $w0, 27
+ ; MSA: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; MSA: BZ_B $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z5bnz_8Dv16_a
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_B killed renamable $w0, 27
+ ; PIC: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; PIC: BZ_B $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_B killed renamable $w0, 27
+ renamable $w0 = SHF_W killed renamable $w0, 177
+ BNZ_B killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z6bnz_16Dv8_s
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z6bnz_16Dv8_s
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_H killed renamable $w0, 27
+ ; MSA: BZ_H $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z6bnz_16Dv8_s
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_H killed renamable $w0, 27
+ ; PIC: BZ_H $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_H killed renamable $w0, 27
+ BNZ_H killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z6bnz_32Dv4_i
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z6bnz_32Dv4_i
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; MSA: BZ_W $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z6bnz_32Dv4_i
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: renamable $w0 = SHF_W killed renamable $w0, 177
+ ; PIC: BZ_W $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ renamable $w0 = SHF_W killed renamable $w0, 177
+ BNZ_W killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z6bnz_64Dv2_x
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z6bnz_64Dv2_x
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: BZ_D $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z6bnz_64Dv2_x
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: BZ_D $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ BNZ_D killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
+---
+name: _Z6bnz_64_vDv2_x
+alignment: 3
+exposesReturnsTwice: false
+legalized: false
+regBankSelected: false
+selected: false
+failedISel: false
+tracksRegLiveness: true
+registers:
+liveins:
+ - { reg: '$a0_64', virtual-reg: '' }
+ - { reg: '$a1_64', virtual-reg: '' }
+frameInfo:
+ isFrameAddressTaken: false
+ isReturnAddressTaken: false
+ hasStackMap: false
+ hasPatchPoint: false
+ stackSize: 0
+ offsetAdjustment: 0
+ maxAlignment: 1
+ adjustsStack: false
+ hasCalls: false
+ stackProtector: ''
+ maxCallFrameSize: 0
+ hasOpaqueSPAdjustment: false
+ hasVAStart: false
+ hasMustTailInVarArgFunc: false
+ localFrameSize: 0
+ savePoint: ''
+ restorePoint: ''
+fixedStack:
+stack:
+constants:
+body: |
+ ; MSA-LABEL: name: _Z6bnz_64_vDv2_x
+ ; MSA: bb.0.entry:
+ ; MSA: successors: %bb.2(0x40000000), %bb.1(0x40000000)
+ ; MSA: renamable $w0 = LDI_B 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; MSA: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; MSA: BZ_V $w0, %bb.2, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.1.entry:
+ ; MSA: successors: %bb.3(0x80000000)
+ ; MSA: J %bb.3, implicit-def $at {
+ ; MSA: NOP
+ ; MSA: }
+ ; MSA: bb.2.if.then:
+ ; MSA: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 1
+ ; MSA: }
+ ; MSA: bb.3:
+ ; MSA: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; MSA: renamable $v0 = ADDiu $zero, 0
+ ; MSA: }
+ ; PIC-LABEL: name: _Z6bnz_64_vDv2_x
+ ; PIC: bb.0.entry:
+ ; PIC: successors: %bb.3(0x40000000), %bb.1(0x40000000)
+ ; PIC: renamable $w0 = LDI_B 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ ; PIC: renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ ; PIC: BZ_V $w0, %bb.3, implicit-def $at {
+ ; PIC: NOP
+ ; PIC: }
+ ; PIC: bb.1.entry:
+ ; PIC: successors: %bb.2(0x80000000)
+ ; PIC: $sp_64 = DADDiu $sp_64, -16
+ ; PIC: SD $ra_64, $sp_64, 0
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $zero_64, target-flags(mips-abs-hi) %bb.4, %bb.2
+ ; PIC: $at_64 = DSLL $at_64, 16
+ ; PIC: BAL_BR %bb.2, implicit-def $ra {
+ ; PIC: $at_64 = LONG_BRANCH_DADDiu $at_64, target-flags(mips-abs-lo) %bb.4, %bb.2
+ ; PIC: }
+ ; PIC: bb.2.entry:
+ ; PIC: successors: %bb.4(0x80000000)
+ ; PIC: $at_64 = DADDu $ra_64, $at_64
+ ; PIC: $ra_64 = LD $sp_64, 0
+ ; PIC: JR64 $at_64 {
+ ; PIC: $sp_64 = DADDiu $sp_64, 16
+ ; PIC: }
+ ; PIC: bb.3.if.then:
+ ; PIC: INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 1
+ ; PIC: }
+ ; PIC: bb.4:
+ ; PIC: PseudoReturn64 undef $ra_64, implicit killed $v0 {
+ ; PIC: renamable $v0 = ADDiu $zero, 0
+ ; PIC: }
+ bb.0.entry:
+ successors: %bb.1(0x40000000), %bb.2(0x40000000)
+ liveins: $a0_64, $a1_64
+
+ renamable $w0 = LDI_B 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a0_64, 0
+ renamable $w0 = INSERT_D killed renamable $w0, killed renamable $a1_64, 1
+ BNZ_V killed renamable $w0, %bb.2, implicit-def dead $at
+
+ bb.1.if.then:
+ INLINEASM &".space 810680", 1, 12, implicit-def dead early-clobber $at
+ renamable $v0 = ADDiu $zero, 1
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+ bb.2:
+ renamable $v0 = ADDiu $zero, 0
+ PseudoReturn64 undef $ra_64, implicit killed $v0
+
+...
OpenPOWER on IntegriCloud