mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-28 23:52:54 +00:00
Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
llvm-svn: 31315
This commit is contained in:
parent
0e320bc90e
commit
79daf6ae80
@ -184,7 +184,14 @@ void LCSSA::ProcessInstruction(Instruction *Instr,
|
||||
|
||||
// Otherwise, patch up uses of the value with the appropriate LCSSA Phi,
|
||||
// inserting PHI nodes into join points where needed.
|
||||
Value *Val = GetValueForBlock(DT->getNode(UserBB), Instr, Phis);
|
||||
DominatorTree::Node *UserBBNode = DT->getNode(UserBB);
|
||||
|
||||
// If the block has no dominator info, it is unreachable.
|
||||
Value *Val;
|
||||
if (UserBBNode)
|
||||
Val = GetValueForBlock(UserBBNode, Instr, Phis);
|
||||
else
|
||||
Val = UndefValue::get(Instr->getType());
|
||||
|
||||
// Preincrement the iterator to avoid invalidating it when we change the
|
||||
// value.
|
||||
|
Loading…
x
Reference in New Issue
Block a user