auto &PotentialConstantsAA = A.getAAFor<AAPotentialConstantValues>(
*this, ValIRP, DepClassTy::OPTIONAL);
if (PotentialConstantsAA.isValidState()) {
- for (auto &It : PotentialConstantsAA.getAssumedSet()) {
+ for (auto &It : PotentialConstantsAA.getAssumedSet())
State.unionAssumed({{*ConstantInt::get(&Ty, It), nullptr}, S});
- }
- assert(!PotentialConstantsAA.undefIsContained() &&
- "Undef should be an explicit value!");
+ if (PotentialConstantsAA.undefIsContained())
+ State.unionAssumed({{*UndefValue::get(&Ty), nullptr}, S});
return;
}
}
getAnchorScope());
AnyNonLocal = true;
}
- if (undefIsContained())
- unionAssumedWithUndef();
+ assert(!undefIsContained() && "Undef should be an explicit value!");
if (AnyNonLocal)
giveUpOnIntraprocedural(A);