mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 22:04:10 +00:00
Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll
llvm-svn: 6883
This commit is contained in:
parent
30f1a88e0c
commit
867b7661cb
@ -420,12 +420,13 @@ void SCCP::visitPHINode(PHINode &PN) {
|
||||
for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) {
|
||||
InstVal &IV = getValueState(PN.getIncomingValue(i));
|
||||
if (IV.isUndefined()) continue; // Doesn't influence PHI node.
|
||||
if (IV.isOverdefined()) { // PHI node becomes overdefined!
|
||||
markOverdefined(&PN);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent())) {
|
||||
if (IV.isOverdefined()) { // PHI node becomes overdefined!
|
||||
markOverdefined(&PN);
|
||||
return;
|
||||
}
|
||||
|
||||
if (OperandVal == 0) { // Grab the first value...
|
||||
OperandVal = IV.getConstant();
|
||||
} else { // Another value is being merged in!
|
||||
|
Loading…
x
Reference in New Issue
Block a user