https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86617
--- Comment #4 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- this comment in match.pd made me look at operand_equal_p: /* Simplify x - x. This is unsafe for certain floats even in non-IEEE formats. In IEEE, it is unsafe because it does wrong for NaNs. Also note that operand_equal_p is always false if an operand is volatile. */