https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128313
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-10-30
Ever confirmed|0 |1
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
Setting value number of x.0_1 to Nan (changed)
Replaced x with Nan in all uses of x.0_1 = x;
Value numbering stmt = _2 = x.0_1 != 1.0e+0;
Match-and-simplified x.0_1 != 1.0e+0 to 1
RHS x.0_1 != 1.0e+0 simplified to 1
That is fold_relational_const does not have a check for signaling nans.
Needs something like:
/* Don't perform operation if we honor signaling NaNs and
either operand is a signaling NaN. */
if (HONOR_SNANS (mode)
&& (REAL_VALUE_ISSIGNALING_NAN (c0)
|| REAL_VALUE_ISSIGNALING_NAN (c1)))
return NULL_TREE;
Under:
/* Handle the cases where either operand is a NaN. */