summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-02-02 02:22:50 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-02-02 02:22:50 +0000
commit55afd2564c564b8adfd94e7735ce262f621e642b (patch)
treee2d5152c2677237225bd31aed72959c1a3fd7d59 /llvm/test
parentc1f69989b142804eb9c4572fbde08fcc052d203c (diff)
downloadbcm5719-llvm-55afd2564c564b8adfd94e7735ce262f621e642b.tar.gz
bcm5719-llvm-55afd2564c564b8adfd94e7735ce262f621e642b.zip
Perform sibcall in some cases when arguments are passes memory. Look for cases
where callee's arguments are already in the caller's own caller's stack and they line up perfectly. e.g. extern int foo(int a, int b, int c); int bar(int a, int b, int c) { return foo(a, b, c); } llvm-svn: 95053
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/tailcall2.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/tailcall2.ll b/llvm/test/CodeGen/X86/tailcall2.ll
index 1e288f57651..e41e3da4f80 100644
--- a/llvm/test/CodeGen/X86/tailcall2.ll
+++ b/llvm/test/CodeGen/X86/tailcall2.ll
@@ -89,3 +89,16 @@ bb1:
}
declare i32 @bar(i32)
+
+define i32 @t7(i32 %a, i32 %b, i32 %c) nounwind ssp {
+entry:
+; 32: t7:
+; 32: jmp {{_?}}bar2
+
+; 64: t7:
+; 64: jmp {{_?}}bar2
+ %0 = tail call i32 @bar2(i32 %a, i32 %b, i32 %c) nounwind
+ ret i32 %0
+}
+
+declare i32 @bar2(i32, i32, i32)
OpenPOWER on IntegriCloud