aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2011-09-29 23:52:13 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2011-09-29 23:52:13 +0000
commita3defb07a075e936c435428d5adeedc5f12f5ab5 (patch)
treec1a7036649363e970668913f8e09f73234c4c3a4 /test/CodeGen/Mips
parente00897c5a91febe90ba21082fc636be892bf9bf1 (diff)
downloadexternal_llvm-a3defb07a075e936c435428d5adeedc5f12f5ab5.zip
external_llvm-a3defb07a075e936c435428d5adeedc5f12f5ab5.tar.gz
external_llvm-a3defb07a075e936c435428d5adeedc5f12f5ab5.tar.bz2
Fill delay slot with useful instructions. Modified from Sparc's version of delay
slot filler. Patch by Reed Kotler at Mips Technologies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/brdelayslot.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/brdelayslot.ll b/test/CodeGen/Mips/brdelayslot.ll
new file mode 100644
index 0000000..b266ce6
--- /dev/null
+++ b/test/CodeGen/Mips/brdelayslot.ll
@@ -0,0 +1,15 @@
+; RUN: llc -march=mipsel -enable-mips-delay-filler < %s | FileCheck %s
+
+define void @foo1() nounwind {
+entry:
+; CHECK: jalr
+; CHECK-NOT: nop
+; CHECK: jr
+; CHECK-NOT: nop
+; CHECK: .end
+
+ tail call void @foo2(i32 3) nounwind
+ ret void
+}
+
+declare void @foo2(i32)