mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 13:10:34 +00:00
Return Undef if the block has no dominator. This was required to allow
llvm-gcc build to succeed. Without this change it fails in libstdc++ compilation. This causes no regressions in dejagnu tests. However, someone who knows this code better might want to review it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
384152444d
commit
bde6869ef4
@ -231,6 +231,10 @@ Value *LCSSA::GetValueForBlock(DomTreeNode *BB, Instruction *OrigInst,
|
|||||||
|
|
||||||
DomTreeNode *IDom = BB->getIDom();
|
DomTreeNode *IDom = BB->getIDom();
|
||||||
|
|
||||||
|
// If the block has no dominator, bail
|
||||||
|
if (!IDom)
|
||||||
|
return V = UndefValue::get(OrigInst->getType());
|
||||||
|
|
||||||
// Otherwise, there are two cases: we either have to insert a PHI node or we
|
// Otherwise, there are two cases: we either have to insert a PHI node or we
|
||||||
// don't. We need to insert a PHI node if this block is not dominated by one
|
// don't. We need to insert a PHI node if this block is not dominated by one
|
||||||
// of the exit nodes from the loop (the loop could have multiple exits, and
|
// of the exit nodes from the loop (the loop could have multiple exits, and
|
||||||
|
Loading…
Reference in New Issue
Block a user