https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107569

--- Comment #28 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Aldy Hernandez from comment #27)
> > As for signed zeros in -fsigned-zeros (default) mode, wonder if we e.g. 
> > don't
> > say sqrt is nonnegative (even when sqrt (-0.0) is -0.0).
> 
> It seems tree_call_nonnegative_warnv_p is already doing the right thing for
> sqrt?
> 
>     CASE_CFN_SQRT:
>     CASE_CFN_SQRT_FN:
>       /* sqrt(-0.0) is -0.0.  */
>       if (!HONOR_SIGNED_ZEROS (type))
>       return true;
>       return RECURSE (arg0);

Ah, ok.  So, if we during stage3 go through all the cases and convince
ourselves it is good enough, it might be ok for signed zeros then.  Still the
sign of NAN is separate question from that, and there we should set +NAN only
when we see
CASE_CFN_FABS{,_FN} or ABS_EXPR, toggle the sign of NEGATE_EXPR, inherit from
second argument for CASE_CFN_COPYSIGN{,_FN} and copy over for copies.

Reply via email to