1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

DominatorTree.getNode can return null for unreachable blocks.

llvm-svn: 104290
This commit is contained in:
Dan Gohman 2010-05-20 22:46:54 +00:00
parent b841e5c433
commit 3274120902

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