summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2011-02-12 19:02:33 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2011-02-12 19:02:33 +0000
commitcc5bd4a56140f8c7381afa686f28b361fd540436 (patch)
treed2b2082f3661ba68e21b9dca6fc2845898985444 /test/CodeGen/SPARC
parentd02be24cadbba4754df2f3e83473b72c5de698dd (diff)
downloadllvm-cc5bd4a56140f8c7381afa686f28b361fd540436.tar.gz
llvm-cc5bd4a56140f8c7381afa686f28b361fd540436.tar.bz2
llvm-cc5bd4a56140f8c7381afa686f28b361fd540436.tar.xz
Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/2011-01-19-DelaySlot.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
index d9fc8ea3aa..bc27e987a1 100644
--- a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
+++ b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
@@ -1,4 +1,5 @@
;RUN: llc -march=sparc < %s | FileCheck %s
+;RUN: llc -march=sparc -O0 < %s | FileCheck %s -check-prefix=UNOPT
define i32 @test(i32 %a) nounwind {
@@ -75,3 +76,15 @@ bb1: ; preds = %entry
declare i32 @foo(...)
declare i32 @bar(i32)
+
+
+define i32 @test_implicit_def() nounwind {
+entry:
+;UNOPT: test_implicit_def
+;UNOPT: call func
+;UNOPT-NEXT: nop
+ %0 = tail call i32 @func(i32* undef) nounwind
+ ret i32 0
+}
+
+declare i32 @func(i32*)