From: David Majnemer Date: Sat, 8 Aug 2015 03:51:49 +0000 (+0000) Subject: [InstCombine] Don't try to sink EH pad instructions X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3309afe8f59c2dfefde556215b4e6aa1024573a8;p=oota-llvm.git [InstCombine] Don't try to sink EH pad instructions Found by inspection, this change should not effect the existing landingpad behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244391 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 45994d186f6..734056d2118 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2672,7 +2672,7 @@ 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) || isa(I) || I->mayHaveSideEffects() || + if (isa(I) || I->isEHPad() || I->mayHaveSideEffects() || isa(I)) return false; @@ -2975,7 +2975,7 @@ static bool prepareICWorklistFromFunction(Function &F, const DataLayout &DL, Instruction *Inst = --I; if (!Inst->use_empty()) Inst->replaceAllUsesWith(UndefValue::get(Inst->getType())); - if (isa(Inst)) { + if (Inst->isEHPad()) { EndInst = Inst; continue; }