summaryrefslogtreecommitdiff
path: root/test/Transforms/TailCallElim
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-04-21 20:48:47 +0000
committerReid Kleckner <reid@kleckner.net>2014-04-21 20:48:47 +0000
commit0df9abbd63a6cb3767d3ddf3b6c2f8ea8a4f6f7e (patch)
tree4aa9b671f14fb7940eded1c5db0ad6c20e7fa92e /test/Transforms/TailCallElim
parent290ce1944c02ec81787b80dc2a41119de5d7e412 (diff)
downloadllvm-0df9abbd63a6cb3767d3ddf3b6c2f8ea8a4f6f7e.tar.gz
llvm-0df9abbd63a6cb3767d3ddf3b6c2f8ea8a4f6f7e.tar.bz2
llvm-0df9abbd63a6cb3767d3ddf3b6c2f8ea8a4f6f7e.tar.xz
Fix PR7272 in -tailcallelim instead of the inliner
The -tailcallelim pass should be checking if byval or inalloca args can be captured before marking calls as tail calls. This was the real root cause of PR7272. With a better fix in place, revert the inliner change from r105255. The test case it introduced still passes and has been moved to test/Transforms/Inline/byval-tail-call.ll. Reviewers: chandlerc Differential Revision: http://reviews.llvm.org/D3403 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/TailCallElim')
-rw-r--r--test/Transforms/TailCallElim/basic.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/TailCallElim/basic.ll b/test/Transforms/TailCallElim/basic.ll
index 35420ab08c..5582ee33ed 100644
--- a/test/Transforms/TailCallElim/basic.ll
+++ b/test/Transforms/TailCallElim/basic.ll
@@ -143,3 +143,11 @@ cond_false:
call void @noarg()
ret i32* null
}
+
+; Don't tail call if a byval arg is captured.
+define void @test9(i32* byval %a) {
+; CHECK-LABEL: define void @test9(
+; CHECK: {{^ *}}call void @use(
+ call void @use(i32* %a)
+ ret void
+}