diff options
author | Sujoy Saraswati <sujoy.saraswati@hpe.com> | 2015-12-20 09:13:51 +0000 |
---|---|---|
committer | Sujoy Saraswati <ssaraswati@gcc.gnu.org> | 2015-12-20 09:13:51 +0000 |
commit | 683aa9290bad382f137c9f205a91b3d8c78aecd6 (patch) | |
tree | 62f0bdc62d4027b4d465778be408d23f54f86398 /gcc/fold-const.c | |
parent | e4dbb0d449e778bc810d0d627a5aaefd0d7847b1 (diff) | |
download | gcc-683aa9290bad382f137c9f205a91b3d8c78aecd6.zip gcc-683aa9290bad382f137c9f205a91b3d8c78aecd6.tar.gz gcc-683aa9290bad382f137c9f205a91b3d8c78aecd6.tar.bz2 |
This series of patches are for fixing PR61441.
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
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 553a9c3..fff0285 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1150,9 +1150,10 @@ const_binop (enum tree_code code, tree arg1, tree arg2) 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 |