diff options
author | Chris Lattner <sabre@nondot.org> | 2005-05-14 12:28:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-05-14 12:28:32 +0000 |
commit | 65af1abd1e4d93a57b28f3f81f7a4c7af851ba30 (patch) | |
tree | d14d28c260befef53e145d8d00f9a1c9daa92a39 /lib/Transforms/LevelRaise.cpp | |
parent | e43702695dd4500c2a11671f9d353b5cc6b2603b (diff) |
Preserve calling conv when hacking on calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r-- | lib/Transforms/LevelRaise.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index c15aa257d9..718f07de82 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -538,6 +538,8 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { // Create a new call instruction... CallInst *NewCall = new CallInst(NewCast, std::vector<Value*>(CI->op_begin()+1, CI->op_end())); + if (CI->isTailCall()) NewCall->setTailCall(); + NewCall->setCallingConv(CI->getCallingConv()); ++BI; ReplaceInstWithInst(CI, NewCall); |