summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-08-08 03:51:49 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-08-08 03:51:49 +0000
commit60c994b98525a2301f1959094ee6f0da5d531805 (patch)
tree4b3da93c36b9b3b94d16b5e821a30aac37890ac1 /llvm/lib/Transforms
parent67c4df83131db39680f370ba5cb28ab3139ae5a3 (diff)
downloadbcm5719-llvm-60c994b98525a2301f1959094ee6f0da5d531805.tar.gz
bcm5719-llvm-60c994b98525a2301f1959094ee6f0da5d531805.zip
[InstCombine] Don't try to sink EH pad instructions
Found by inspection, this change should not effect the existing landingpad behavior. llvm-svn: 244391
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 45994d186f6..734056d2118 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/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<PHINode>(I) || isa<LandingPadInst>(I) || I->mayHaveSideEffects() ||
+ if (isa<PHINode>(I) || I->isEHPad() || I->mayHaveSideEffects() ||
isa<TerminatorInst>(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<LandingPadInst>(Inst)) {
+ if (Inst->isEHPad()) {
EndInst = Inst;
continue;
}
OpenPOWER on IntegriCloud