You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DivRemPairs] Do not freeze poisons that can't be undef
Per comments in DivRemPairs, the rewrite from
%div = div %X, %Y
%rem = rem %X, %Y
to
%div = div %X, %Y
%.mul = mul %div, %Y
%rem = sub %X, %mul
is unsound when %X or %Y are undef.
However, it is known to be sound if %X or %Y are poison but can't be
undef, since both the pre- and post-rewrite %rem are `poison`.
A comment in the pass listed a TODO for changing a usage of
isGuaranteedNotToBeUndefOrPoison() in the pass to something that only
detects undef. Such a function has been implemented since the time
that TODO was written, but has not been used.
Therefore, this commit updates DivRemPairs to use
isGuaranteedNotToBeUndef() instead.
0 commit comments