This series of patches are for fixing PR61441. This patch modifies code to use
REAL_VALUE_ISSIGNALING_NAN instead of REAL_VALUE_ISNAN to avoid the operatins
only for sNaN operands.
Bootstrapped & regression-tested on x86_64-linux-gnu.
gcc/
* fold-const.c (const_binop): Use REAL_VALUE_ISSIGNALING_NAN instead
of REAL_VALUE_ISNAN to avoid the operation for sNaN operands.
* simplify-rtx.c (simplify_const_binary_operation): Same.
From-SVN: r231857
+2015-12-20 Sujoy Saraswati <sujoy.saraswati@hpe.com>
+
+ PR tree-optimization/61441
+ * fold-const.c (const_binop): Use REAL_VALUE_ISSIGNALING_NAN instead
+ of REAL_VALUE_ISNAN to avoid the operation for sNaN operands.
+ * simplify-rtx.c (simplify_const_binary_operation): Same.
+
2015-12-19 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/65337
mode = TYPE_MODE (type);
/* Don't perform operation if we honor signaling NaNs and
- either operand is a NaN. */
+ either operand is a signaling NaN. */
if (HONOR_SNANS (mode)
- && (REAL_VALUE_ISNAN (d1) || REAL_VALUE_ISNAN (d2)))
+ && (REAL_VALUE_ISSIGNALING_NAN (d1)
+ || REAL_VALUE_ISSIGNALING_NAN (d2)))
return NULL_TREE;
/* Don't perform operation if it would raise a division
real_convert (&f1, mode, CONST_DOUBLE_REAL_VALUE (op1));
if (HONOR_SNANS (mode)
- && (REAL_VALUE_ISNAN (f0) || REAL_VALUE_ISNAN (f1)))
+ && (REAL_VALUE_ISSIGNALING_NAN (f0)
+ || REAL_VALUE_ISSIGNALING_NAN (f1)))
return 0;
if (code == DIV