https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107569
--- Comment #29 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #28) > (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. >From what I've seen, ABS is represented in the IL directly without the need for a builtin, at least by evrp time. Is this not always the case? Negate, copysign, and copy are already handled specially so no need to do anything there. I have a patch I'm testing for the generic case.