[llvm-commits] [llvm] r137629 - /llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Bill Wendling
isanbard at gmail.com
Mon Aug 15 11:23:40 PDT 2011
Author: void
Date: Mon Aug 15 13:23:40 2011
New Revision: 137629
URL: http://llvm.org/viewvc/llvm-project?rev=137629&view=rev
Log:
Don't try to sink the landingpad instruction. It's immobile.
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=137629&r1=137628&r2=137629&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Mon Aug 15 13:23:40 2011
@@ -1417,8 +1417,9 @@
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.
More information about the llvm-commits
mailing list