[llvm-commits] [llvm] r104290 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Dan Gohman
gohman at apple.com
Thu May 20 15:46:54 PDT 2010
Author: djg
Date: Thu May 20 17:46:54 2010
New Revision: 104290
URL: http://llvm.org/viewvc/llvm-project?rev=104290&view=rev
Log:
DominatorTree.getNode can return null for unreachable blocks.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=104290&r1=104289&r2=104290&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu May 20 17:46:54 2010
@@ -3127,7 +3127,7 @@
BasicBlock *IDom;
for (DomTreeNode *Rung = DT.getNode(IP->getParent()); ; ) {
- assert(Rung && "Block has no DomTreeNode!");
+ if (!Rung) return IP;
Rung = Rung->getIDom();
if (!Rung) return IP;
IDom = Rung->getBlock();
More information about the llvm-commits
mailing list