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
This commit is contained in:
Dan Gohman 2010-05-20 22:46:54 +00:00
parent 9f383eb950
commit 0fe46d9b48

View File

@ -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();