diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-02-26 00:04:25 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-02-26 00:04:25 +0000 |
commit | 08dd52dc756864b1ca917a514eae33064896be3a (patch) | |
tree | 19e49ce6bd69ceeb5bf3e1b12977474b026e835e /llvm/lib | |
parent | ad59b65f18b0b7923dd15a2ded1cc96602da08f5 (diff) | |
download | bcm5719-llvm-08dd52dc756864b1ca917a514eae33064896be3a.tar.gz bcm5719-llvm-08dd52dc756864b1ca917a514eae33064896be3a.zip |
[WinEH] Don't remove unannotated inline-asm calls
Inline-asm calls aren't annotated with funclet bundle operands because
they don't throw and cannot be inlined through. We shouldn't require
them to bear an funclet bundle operand.
llvm-svn: 261942
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 8157857bc25..b2b3130e9f1 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -948,10 +948,11 @@ void WinEHPrepare::removeImplausibleInstructions(Function &F) { if (FuncletBundleOperand == FuncletPad) continue; - // Skip call sites which are nounwind intrinsics. + // Skip call sites which are nounwind intrinsics or inline asm. auto *CalledFn = dyn_cast<Function>(CS.getCalledValue()->stripPointerCasts()); - if (CalledFn && CalledFn->isIntrinsic() && CS.doesNotThrow()) + if (CalledFn && ((CalledFn->isIntrinsic() && CS.doesNotThrow()) || + CS.isInlineAsm())) continue; // This call site was not part of this funclet, remove it. |