summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-20 22:46:54 +0000
committerDan Gohman <gohman@apple.com>2010-05-20 22:46:54 +0000
commit0fe46d9b480ab4851e1fc8bc589d1ed9c8b2a70e (patch)
treeed2d0d3cbe7447f580be2f5ef8a3ee25617f5b0e
parent9f383eb9503580a1425073beee99fdf74ed31a17 (diff)
downloadexternal_llvm-0fe46d9b480ab4851e1fc8bc589d1ed9c8b2a70e.zip
external_llvm-0fe46d9b480ab4851e1fc8bc589d1ed9c8b2a70e.tar.gz
external_llvm-0fe46d9b480ab4851e1fc8bc589d1ed9c8b2a70e.tar.bz2
DominatorTree.getNode can return null for unreachable blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104290 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 1f6ae6a..86ea3eb 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -3127,7 +3127,7 @@ LSRInstance::HoistInsertPosition(BasicBlock::iterator IP,
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();