Re: [match.pd PATCH] PR tree-optimization/126467: 0.0-x -> -x vs. signed zeros.

Alexander Monakov <[email protected]> Fri, 7 Aug 2026 10:30:35 +0300 (MSK)
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
On Wed, 5 Aug 2026, Roger Sayle wrote:

> Likewise when x is NaN, 0.0 - x
> may change the payload, but -x is guaranteed not to.

Not saying you should drop the condition in your patch, but do we care
about NaN payload propagation anywhere else? The HONOR_NANS et al. only
seem to cover presence/absence of NaNs, not observability of payloads.

> gcc/ChangeLog
>         PR tree-optimization/126467
>         * match.pd (0.0 - x -> -x): Update the conditions under which
>         the transformation is performed, disallowing x = +0.0 when we
>         honor signed zeros.

(this doesn't seem to mention NaNs)

Alexander