diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 17beeb5aa84..c274b1595a7 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -411,6 +411,7 @@ static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){ if (!InsertedCast) { BasicBlock::iterator InsertPt = UserBB->getFirstNonPHI(); + if (isa<LandingPadInst>(InsertPt)) ++InsertPt; InsertedCast = CastInst::Create(CI->getOpcode(), CI->getOperand(0), CI->getType(), "", |

