mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e3af1ef87
commit
38b5ae4b48
@ -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