summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@mips.com>2017-11-09 16:02:18 +0000
committerSimon Dardis <simon.dardis@mips.com>2017-11-09 16:02:18 +0000
commitc2d3e38ba6ee7e1ae61ed3682a17ee3c1690e15b (patch)
treea67104743414b27c69cbe2cb703b61b68e333359 /llvm/test/CodeGen/Mips
parente5af5bde71e3730a2b5bfca6067764df13abdfc5 (diff)
downloadbcm5719-llvm-c2d3e38ba6ee7e1ae61ed3682a17ee3c1690e15b.tar.gz
bcm5719-llvm-c2d3e38ba6ee7e1ae61ed3682a17ee3c1690e15b.zip
[mips] Correct microMIP's jump and add unconditional branch pseudo
Correct the definition of 'j' as being unavailable for microMIPS32R6 and provide the 'b' assembly idiom for codegen purposes for microMIPS32r3. Provide the necessary 'br' pattern for microMIPS32R6 as it now longer incorrectly uses the 'j' instruction. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D39741 llvm-svn: 317801
Diffstat (limited to 'llvm/test/CodeGen/Mips')
-rw-r--r--llvm/test/CodeGen/Mips/br-jmp.ll26
1 files changed, 17 insertions, 9 deletions
diff --git a/llvm/test/CodeGen/Mips/br-jmp.ll b/llvm/test/CodeGen/Mips/br-jmp.ll
index 5e94c755c96..1323dedb462 100644
--- a/llvm/test/CodeGen/Mips/br-jmp.ll
+++ b/llvm/test/CodeGen/Mips/br-jmp.ll
@@ -1,7 +1,13 @@
-; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefix=CHECK-PIC
-; RUN: llc -march=mipsel -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC
-; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=CHECK-PIC16
-; RUN: llc -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=CHECK-STATIC16
+; RUN: llc -asm-show-inst -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
+; RUN: llc -asm-show-inst -march=mipsel -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC
+; RUN: llc -asm-show-inst -march=mipsel -mattr=mips16 -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC16
+; RUN: llc -asm-show-inst -march=mipsel -mattr=mips16 -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC16
+; RUN: llc -asm-show-inst -march=mips -mattr=+micromips -relocation-model=static < %s | FileCheck %s -check-prefix=STATICMM
+; RUN: llc -asm-show-inst -march=mips -mattr=+micromips -relocation-model=pic < %s | FileCheck %s -check-prefix=PICMM
+; RUN: llc -asm-show-inst -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=static < %s | FileCheck %s -check-prefix=STATICMMR6
+; RUN: llc -asm-show-inst -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC
+
+
define void @count(i32 %x, i32 %y, i32 %z) noreturn nounwind readnone {
entry:
@@ -11,8 +17,10 @@ bosco: ; preds = %bosco, %entry
br label %bosco
}
-; CHECK-PIC: b $BB0_1
-; CHECK-STATIC: j $BB0_1
-; CHECK-PIC16: b $BB0_1
-; CHECK-STATIC16: b $BB0_1
-
+; PIC: b $BB0_1 # <MCInst #{{.*}} BEQ
+; PICMM: b $BB0_1 # <MCInst #{{.*}} BEQ_MM
+; STATIC: j $BB0_1 # <MCInst #{{.*}} J
+; STATICMM: j $BB0_1 # <MCInst #{{.*}} J_MM
+; STATICMMR6: bc $BB0_1 # <MCInst #{{.*}} BC_MMR6
+; PIC16: b $BB0_1
+; STATIC16: b $BB0_1
OpenPOWER on IntegriCloud