diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-15 18:21:07 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-15 18:21:07 +0000 |
commit | 1178fb47018fea531c91ee04e39f30607122e763 (patch) | |
tree | 4c322a983098db4344adeefe2f9f6bbf55fd63c2 /lib/Transforms | |
parent | 6f9d8ffe5e47e3d11176298e849cc8545c2169a2 (diff) |
Skip the insertion iterator past the landingpad instruction if there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 17beeb5aa8..c274b1595a 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/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(), "", |