summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorJozef Kolek <jozef.kolek@imgtec.com>2015-02-13 17:51:27 +0000
committerJozef Kolek <jozef.kolek@imgtec.com>2015-02-13 17:51:27 +0000
commit650a61a9438d3979679e19f38ad3972542cb155c (patch)
tree79d66fd4f09e4db8a4f88b3c4c00e6c71f22fb65 /llvm/test/CodeGen
parent8a9d23bf5349a121903aaf3c3096da07da9c3b00 (diff)
downloadbcm5719-llvm-650a61a9438d3979679e19f38ad3972542cb155c.tar.gz
bcm5719-llvm-650a61a9438d3979679e19f38ad3972542cb155c.zip
[mips][microMIPS] Delay slot filler: Replace the microMIPS JR with the JRC
This patch adds functionality in MIPS delay slot filler such as if delay slot filler have to put NOP instruction into the delay slot of microMIPS JR instruction, then instead of emitting NOP this instruction is replaced by compact jump instruction JRC. Differential Revision: http://reviews.llvm.org/D7522 llvm-svn: 229128
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Mips/longbranch.ll3
-rw-r--r--llvm/test/CodeGen/Mips/micromips-compact-jump.ll11
-rw-r--r--llvm/test/CodeGen/Mips/micromips-delay-slot-jr.ll6
3 files changed, 14 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/Mips/longbranch.ll b/llvm/test/CodeGen/Mips/longbranch.ll
index 821ced8e7b8..f61b250491e 100644
--- a/llvm/test/CodeGen/Mips/longbranch.ll
+++ b/llvm/test/CodeGen/Mips/longbranch.ll
@@ -126,8 +126,7 @@ end:
; MICROMIPS: li16 $[[R2:[0-9]+]], 1
; MICROMIPS: sw16 $[[R2]], 0($[[R1]])
; MICROMIPS: $[[BB2]]:
-; MICROMIPS: jr $ra
-; MICROMIPS: nop
+; MICROMIPS: jrc $ra
; Check the NaCl version. Check that sp change is not in the branch delay slot
diff --git a/llvm/test/CodeGen/Mips/micromips-compact-jump.ll b/llvm/test/CodeGen/Mips/micromips-compact-jump.ll
new file mode 100644
index 00000000000..70cff84e967
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/micromips-compact-jump.ll
@@ -0,0 +1,11 @@
+; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
+; RUN: -disable-mips-delay-filler -O3 < %s | FileCheck %s
+
+define i32 @foo(i32 signext %a) #0 {
+entry:
+ ret i32 0
+}
+
+declare i32 @bar(i32 signext) #1
+
+; CHECK: jrc
diff --git a/llvm/test/CodeGen/Mips/micromips-delay-slot-jr.ll b/llvm/test/CodeGen/Mips/micromips-delay-slot-jr.ll
index df593b35e2a..09a98c2a7d1 100644
--- a/llvm/test/CodeGen/Mips/micromips-delay-slot-jr.ll
+++ b/llvm/test/CodeGen/Mips/micromips-delay-slot-jr.ll
@@ -29,8 +29,7 @@ declare i32 @puts(i8* nocapture readonly) #1
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}
-; CHECK: jr
-; CHECK-NEXT: nop
+; CHECK: jrc
%struct.foostruct = type { [3 x float] }
%struct.barstruct = type { %struct.foostruct, float }
@@ -43,6 +42,5 @@ define float* @spooky(i32 signext %i) #0 {
}
; CHECK: spooky:
-; CHECK: jr $ra
-; CHECK-NEXT: nop
+; CHECK: jrc $ra
OpenPOWER on IntegriCloud