[llvm-commits] [llvm] r50901 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Fri May 9 08:07:35 PDT 2008
Author: lattner
Date: Fri May 9 10:07:33 2008
New Revision: 50901
URL: http://llvm.org/viewvc/llvm-project?rev=50901&view=rev
Log:
don't sink invokes, even if they are readonly. This fixes a
crash on kimwitu++.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=50901&r1=50900&r2=50901&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 9 10:07:33 2008
@@ -11233,7 +11233,8 @@
assert(I->hasOneUse() && "Invariants didn't hold!");
// Cannot move control-flow-involving, volatile loads, vaarg, etc.
- if (isa<PHINode>(I) || I->mayWriteToMemory()) return false;
+ if (isa<PHINode>(I) || I->mayWriteToMemory() || isa<TerminatorInst>(I))
+ return false;
// Do not sink alloca instructions out of the entry block.
if (isa<AllocaInst>(I) && I->getParent() ==
More information about the llvm-commits
mailing list