gcc/
PR rtl-optimization/110305
* simplify-rtx.cc (simplify_context::simplify_binary_operation_1):
Handle HONOR_SNANS for x + 0.0.
when x is NaN, infinite, or finite and nonzero. They aren't
when x is -0 and the rounding mode is not towards -infinity,
since (-0) + 0 is then 0. */
- if (!HONOR_SIGNED_ZEROS (mode) && trueop1 == CONST0_RTX (mode))
+ if (!HONOR_SIGNED_ZEROS (mode) && !HONOR_SNANS (mode)
+ && trueop1 == CONST0_RTX (mode))
return op0;
/* ((-a) + b) -> (b - a) and similarly for (a + (-b)). These