Re: [PATCH] PR middle-end/98420: Don't fold x - x to 0.0 with -frounding-math

2022-03-11 Thread Richard Biener via Gcc-patches
On Fri, Mar 11, 2022 at 12:31 AM Roger Sayle wrote: > > > This patch addresses PR middle-end/98420, which is inappropriate constant > folding of x - x to 0.0 (in match.pd) when -frounding-math is specified. > Specifically, x - x may be -0.0 with FE_DOWNWARD as the rounding mode. > > To summarize,

[PATCH] PR middle-end/98420: Don't fold x - x to 0.0 with -frounding-math

2022-03-10 Thread Roger Sayle
This patch addresses PR middle-end/98420, which is inappropriate constant folding of x - x to 0.0 (in match.pd) when -frounding-math is specified. Specifically, x - x may be -0.0 with FE_DOWNWARD as the rounding mode. To summarize, the desired IEEE behaviour, x - x for floating point x, (1) can't