On Mon, 18 Sep 2023, Florian Weimer via Gcc wrote:
> x - x is different because replacing it with 0 doesn't seem to be a > valid contraction because it's incorrect for NaNs. x + x - x seems to > be different in this regard, but in our implementation, there might be a > quirk about sNaNs and qNaNs. Sorry, do you mean contracting 'x + x - x' to 'x'? That is not allowed due to different result and lack of FP exception for infinities. Contracting 'x + x - x' to fma(x, 2, -x) would be fine. Alexander