aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/tailcall-structret.ll
diff options
context:
space:
mode:
authorArnold Schwaighofer <arnold.schwaighofer@gmail.com>2009-03-28 08:33:27 +0000
committerArnold Schwaighofer <arnold.schwaighofer@gmail.com>2009-03-28 08:33:27 +0000
commite75fd69f15dc1b35d20b12d0e765ea6f2b9ffe0b (patch)
tree5d16e8dd25eccdf855e428d8f2f885c10e2b368e /test/CodeGen/X86/tailcall-structret.ll
parent1717f3af087e44d2c4b7fe2b35abc29a33d6d315 (diff)
downloadexternal_llvm-e75fd69f15dc1b35d20b12d0e765ea6f2b9ffe0b.zip
external_llvm-e75fd69f15dc1b35d20b12d0e765ea6f2b9ffe0b.tar.gz
external_llvm-e75fd69f15dc1b35d20b12d0e765ea6f2b9ffe0b.tar.bz2
Enable tail call optimization for functions that return a struct (bug 3664) and for functions that return types that need extending (e.g i1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67934 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/tailcall-structret.ll')
-rw-r--r--test/CodeGen/X86/tailcall-structret.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/X86/tailcall-structret.ll b/test/CodeGen/X86/tailcall-structret.ll
new file mode 100644
index 0000000..e94d7d8
--- /dev/null
+++ b/test/CodeGen/X86/tailcall-structret.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep TAILCALL
+define fastcc { { i8*, i8* }*, i8*} @init({ { i8*, i8* }*, i8*}, i32) {
+entry:
+ %2 = tail call fastcc { { i8*, i8* }*, i8* } @init({ { i8*, i8*}*, i8*} %0, i32 %1)
+ ret { { i8*, i8* }*, i8*} %2
+}