summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-04-30 00:17:47 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-04-30 00:17:47 +0000
commit52c68bb0f57fd53e4bd3f721e5fd4ca19544551f (patch)
treea340fef821bc80f946eac2f6c48081e64345b9d9 /llvm/lib/Transforms
parentbc6fad0bdf7d2dc0b53fa1a452633172c1035f2c (diff)
downloadbcm5719-llvm-52c68bb0f57fd53e4bd3f721e5fd4ca19544551f.tar.gz
bcm5719-llvm-52c68bb0f57fd53e4bd3f721e5fd4ca19544551f.zip
[LowerGuardIntrinsics] Preserve calling conv when lowering
llvm-svn: 268142
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
index 5f5dd197b44..a58346c2b1c 100644
--- a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
@@ -66,6 +66,7 @@ static void MakeGuardControlFlowExplicit(Function *DeoptIntrinsic,
B.CreateRet(DeoptCall);
}
+ DeoptCall->setCallingConv(CI->getCallingConv());
DeoptBlockTerm->eraseFromParent();
}
@@ -89,6 +90,7 @@ bool LowerGuardIntrinsic::runOnFunction(Function &F) {
auto *DeoptIntrinsic = Intrinsic::getDeclaration(
F.getParent(), Intrinsic::experimental_deoptimize, {F.getReturnType()});
+ DeoptIntrinsic->setCallingConv(GuardDecl->getCallingConv());
for (auto *CI : ToLower) {
MakeGuardControlFlowExplicit(DeoptIntrinsic, CI);
OpenPOWER on IntegriCloud