[llvm-commits] [llvm] r137672 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Eli Friedman eli.friedman at gmail.com
Mon Aug 15 16:00:31 PDT 2011


On Mon, Aug 15, 2011 at 3:53 PM, Bill Wendling <isanbard at gmail.com> wrote:
> Author: void
> Date: Mon Aug 15 17:53:05 2011
> New Revision: 137672
>
> URL: http://llvm.org/viewvc/llvm-project?rev=137672&view=rev
> Log:
> Don't sink the instruction to before a landingpad instruction.
>
> Modified:
>    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=137672&r1=137671&r2=137672&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Aug 15 17:53:05 2011
> @@ -1436,7 +1436,7 @@
>   }
>
>   BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI();
> -
> +  if (isa<LandingPadInst>(InsertPos)) ++InsertPos; // Skip landingpad inst.
>   I->moveBefore(InsertPos);
>   ++NumSunkInst;
>   return true;

Is it legal to sink an arbitrary load past a LandingPadInst?

-Eli




More information about the llvm-commits mailing list