From 9b2cc647eba3b64295e34f43534344ac12c94346 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 21 Apr 2014 20:48:47 +0000 Subject: 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 llvm-svn: 206789 --- llvm/test/Transforms/TailCallElim/basic.ll | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/test/Transforms/TailCallElim/basic.ll') diff --git a/llvm/test/Transforms/TailCallElim/basic.ll b/llvm/test/Transforms/TailCallElim/basic.ll index 35420ab08c3..5582ee33edc 100644 --- a/llvm/test/Transforms/TailCallElim/basic.ll +++ b/llvm/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 +} -- cgit v1.2.3