summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-08-15 18:23:40 +0000
committerBill Wendling <isanbard@gmail.com>2011-08-15 18:23:40 +0000
commit06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8 (patch)
tree3f5dc756f044bd382792a71c1cf9f6ba62ac2ef9 /lib/Transforms/InstCombine
parentda005e7d20ddd623ac6174955473d4df27b1b7d4 (diff)
downloadllvm-06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8.tar.gz
llvm-06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8.tar.bz2
llvm-06f20ebfcf2b4dbe388f6d506b62fb2aa8af5fe8.tar.xz
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
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 41d542af68..32c55a3408 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<PHINode>(I) || I->mayHaveSideEffects() || isa<TerminatorInst>(I))
+ // Cannot move control-flow-involving, volatile loads, vaarg, landingpad, etc.
+ if (isa<PHINode>(I) || isa<LandingPadInst>(I) || I->mayHaveSideEffects() ||
+ isa<TerminatorInst>(I))
return false;
// Do not sink alloca instructions out of the entry block.