[llvm-commits] [llvm] r137626 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Aug 15 11:33:07 PDT 2011
On Mon, Aug 15, 2011 at 11:21 AM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Mon Aug 15 13:21:07 2011
> New Revision: 137626
>
> URL: http://llvm.org/viewvc/llvm-project?rev=137626&view=rev
> Log:
> Skip the insertion iterator past the landingpad instruction if there.
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=137626&r1=137625&r2=137626&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Mon Aug 15 13:21:07 2011
> @@ -411,6 +411,7 @@
>
> if (!InsertedCast) {
> BasicBlock::iterator InsertPt = UserBB->getFirstNonPHI();
> + if (isa<LandingPadInst>(InsertPt)) ++InsertPt;
>
> InsertedCast =
> CastInst::Create(CI->getOpcode(), CI->getOperand(0), CI->getType(), "",
Does every other user of getFirstNonPHI need to check for this as well?
-Eli
More information about the llvm-commits
mailing list