From 2914ba6ec793e2bb0e9ca5891af1d29ee2fee28e Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 31 May 2010 21:00:26 +0000 Subject: Fix PR7272: when inlining through a callsite with byval arguments, the newly created allocas may be used by inlined calls, so these need to have their tail call flags cleared. Fixes PR7272. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105255 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/InlineFunction.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Transforms/Utils/InlineFunction.cpp') diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 91390bc7be..79c667a720 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -351,6 +351,10 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) { // Uses of the argument in the function should use our new alloca // instead. ActualArg = NewAlloca; + + // Calls that we inline may use the new alloca, so we need to clear + // their 'tail' flags. + MustClearTailCallFlags = true; } ValueMap[I] = ActualArg; -- cgit v1.2.3-18-g5258