summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2013-03-01 00:50:52 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2013-03-01 00:50:52 +0000
commite760675b0ed8d7adcc2c991a2d645d2b538a5ab3 (patch)
tree9d211c7597577fb69b37a9a3260081575bcdf6d5 /test/CodeGen/Mips
parent1f7330b16239f50daee57dbf53b20fbacd028ee4 (diff)
downloadllvm-e760675b0ed8d7adcc2c991a2d645d2b538a5ab3.tar.gz
llvm-e760675b0ed8d7adcc2c991a2d645d2b538a5ab3.tar.bz2
llvm-e760675b0ed8d7adcc2c991a2d645d2b538a5ab3.tar.xz
[mips] Add capability to search in the forward direction for instructions that
can fill the delay slot. Currently, this is off by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/brdelayslot.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/brdelayslot.ll b/test/CodeGen/Mips/brdelayslot.ll
index 1e66ecf14d..5e51abe8fe 100644
--- a/test/CodeGen/Mips/brdelayslot.ll
+++ b/test/CodeGen/Mips/brdelayslot.ll
@@ -2,6 +2,8 @@
; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=Default
; RUN: llc -march=mipsel -O1 -relocation-model=static < %s | \
; RUN: FileCheck %s -check-prefix=STATICO1
+; RUN: llc -march=mipsel -disable-mips-df-forward-search=false \
+; RUN: -relocation-model=static < %s | FileCheck %s -check-prefix=FORWARD
define void @foo1() nounwind {
entry:
@@ -99,3 +101,23 @@ entry:
%add = add nsw i32 %1, %a
ret i32 %add
}
+
+; Test searchForward. Check that the second jal's slot is filled with another
+; instruction in the same block.
+;
+; FORWARD: foo10:
+; FORWARD: jal foo11
+; FORWARD: jal foo11
+; FORWARD-NOT: nop
+
+define void @foo10() nounwind {
+entry:
+ tail call void @foo11() nounwind
+ tail call void @foo11() nounwind
+ store i32 0, i32* @g1, align 4
+ tail call void @foo11() nounwind
+ store i32 0, i32* @g1, align 4
+ ret void
+}
+
+declare void @foo11()