aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-06 06:46:58 +0000
committerChris Lattner <sabre@nondot.org>2005-05-06 06:46:58 +0000
commit1430ef134d36888b99d2e6fedd2b025882593538 (patch)
treed09aef7e0653908607315cb6f41b0a91b91e44eb /lib/Transforms/IPO/ArgumentPromotion.cpp
parentcfae2e80c813fa0e03ebd86a525cc3f034b2b8d7 (diff)
preserve the tail marker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 028fda9aeb..fd5a5d0215 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -443,6 +443,8 @@ Function *ArgPromotion::DoPromotion(Function *F,
Args, "", Call);
} else {
New = new CallInst(NF, Args, "", Call);
+ if (cast<CallInst>(Call)->isTailCall())
+ cast<CallInst>(New)->setTailCall();
}
Args.clear();