From: Bill Wendling Date: Mon, 15 Aug 2011 18:23:40 +0000 (+0000) Subject: Don't try to sink the landingpad instruction. It's immobile. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8;p=oota-llvm.git Don't try to sink the landingpad instruction. It's immobile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137629 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 41d542af685..32c55a3408d 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1417,8 +1417,9 @@ Instruction *InstCombiner::visitExtractValueInst(ExtractValueInst &EV) { static bool TryToSinkInstruction(Instruction *I, BasicBlock *DestBlock) { assert(I->hasOneUse() && "Invariants didn't hold!"); - // Cannot move control-flow-involving, volatile loads, vaarg, etc. - if (isa(I) || I->mayHaveSideEffects() || isa(I)) + // Cannot move control-flow-involving, volatile loads, vaarg, landingpad, etc. + if (isa(I) || isa(I) || I->mayHaveSideEffects() || + isa(I)) return false; // Do not sink alloca instructions out of the entry block.