mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +00:00
Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31315 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c176fa3d37
commit
1753faee81
@ -184,7 +184,14 @@ void LCSSA::ProcessInstruction(Instruction *Instr,
|
|||||||
|
|
||||||
// Otherwise, patch up uses of the value with the appropriate LCSSA Phi,
|
// Otherwise, patch up uses of the value with the appropriate LCSSA Phi,
|
||||||
// inserting PHI nodes into join points where needed.
|
// 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
|
// Preincrement the iterator to avoid invalidating it when we change the
|
||||||
// value.
|
// value.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user