On Thu, Nov 10, 2022 at 04:03:46PM +0100, Aldy Hernandez wrote:
> [Jakub, how's this?  Do you agree?]
> 
> After further reading of the IEEE 754 standard, it has become clear
> that there are no guarantees with regards to the sign of a NAN when it
> comes to any operation other than copy, copysign, abs, and negate.
> 
> Currently, set_nonnegative() is only used in one place in ranger
> applicable to floating point values, when expanding unknown calls.
> Since we already specially handle copy, copysign, abs, and negate, all
> the calls to set_nonnegative() must be NAN-sign agnostic.
> 
> The cleanest solution is to leave the sign unspecificied in
> frange::set_nonnegative().  Any special case, must be handled by the
> caller.
> 
> gcc/ChangeLog:
> 
>       * value-range.cc (frange::set_nonnegative): Remove NAN sign handling.
>       (range_tests_signed_zeros): Adjust test.

LGTM, thanks.

        Jakub

Reply via email to