mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[Attributor][NFC] Do not manifest noundef for positions to be changed to undef
This patch fixes AANoUndef manifestation. We should not manifest noundef for positions that will be changed to undef. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86835
This commit is contained in:
parent
861127265e
commit
408b703e38
@ -7812,6 +7812,13 @@ struct AANoUndefImpl : AANoUndef {
|
||||
// values.
|
||||
if (A.isAssumedDead(getIRPosition(), nullptr, nullptr))
|
||||
return ChangeStatus::UNCHANGED;
|
||||
// A position whose simplified value does not have any value is
|
||||
// considered to be dead. We don't manifest noundef in such positions for
|
||||
// the same reason above.
|
||||
auto &ValueSimplifyAA = A.getAAFor<AAValueSimplify>(
|
||||
*this, getIRPosition(), /* TrackDependence */ false);
|
||||
if (!ValueSimplifyAA.getAssumedSimplifiedValue(A).hasValue())
|
||||
return ChangeStatus::UNCHANGED;
|
||||
return AANoUndef::manifest(A);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user