mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 00:14:20 +00:00
Fix PR#50
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9227 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d45bd007d
commit
3c4a34e8db
@ -269,12 +269,12 @@ void PromoteMem2Reg::run() {
|
|||||||
|
|
||||||
// At this point, the blocks left in the preds list must have dummy
|
// At this point, the blocks left in the preds list must have dummy
|
||||||
// entries inserted into every PHI nodes for the block.
|
// entries inserted into every PHI nodes for the block.
|
||||||
for (unsigned i = 0, e = PNs.size(); i != e; ++i) {
|
for (unsigned i = 0, e = PNs.size(); i != e; ++i)
|
||||||
PHINode *PN = PNs[i];
|
if (PHINode *PN = PNs[i]) {
|
||||||
Value *NullVal = Constant::getNullValue(PN->getType());
|
Value *NullVal = Constant::getNullValue(PN->getType());
|
||||||
for (unsigned pred = 0, e = Preds.size(); pred != e; ++pred)
|
for (unsigned pred = 0, e = Preds.size(); pred != e; ++pred)
|
||||||
PN->addIncoming(NullVal, Preds[pred]);
|
PN->addIncoming(NullVal, Preds[pred]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user