summaryrefslogtreecommitdiffstats
path: root/test/Transforms/TailCallElim
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-01-31 00:59:31 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-01-31 00:59:31 +0000
commit56a5886b20433569e5eb9c5b1ad350ef0c0e0596 (patch)
tree8fc9464d61ba12128eebcff14f3218c2d5293792 /test/Transforms/TailCallElim
parent3ed6f876c8c30d82dceccfdd7e3f1774a85adc7c (diff)
downloadexternal_llvm-56a5886b20433569e5eb9c5b1ad350ef0c0e0596.zip
external_llvm-56a5886b20433569e5eb9c5b1ad350ef0c0e0596.tar.gz
external_llvm-56a5886b20433569e5eb9c5b1ad350ef0c0e0596.tar.bz2
Do not mark no-return calls tail calls. It'll screw up special calls like longjmp and it doesn't make much sense for performance reason. If my logic is faulty, please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/TailCallElim')
-rw-r--r--test/Transforms/TailCallElim/no-return-calls.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/TailCallElim/no-return-calls.ll b/test/Transforms/TailCallElim/no-return-calls.ll
new file mode 100644
index 0000000..f5643ae
--- /dev/null
+++ b/test/Transforms/TailCallElim/no-return-calls.ll
@@ -0,0 +1,12 @@
+; RUN: opt < %s -tailcallelim -S | FileCheck %s
+
+define void @t() nounwind ssp {
+entry:
+; CHECK: entry:
+; CHECK: %0 = call i32 @foo()
+; CHECK: ret void
+ %0 = call i32 @foo() nounwind noreturn
+ ret void
+}
+
+declare i32 @foo()