diff options
author | Roger Sayle <sayle@gcc.gnu.org> | 2003-02-19 22:59:33 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-02-19 22:59:33 +0000 |
commit | 3bc400cdc1d413b96b07bf8d590a5e99bf9c326a (patch) | |
tree | a66699c948423365ed0ae6efa1aedf2907f37176 /gcc | |
parent | b5a49c0bc8fe2914ed79aae28281bf0d25f152b4 (diff) | |
download | gcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.zip gcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.tar.gz gcc-3bc400cdc1d413b96b07bf8d590a5e99bf9c326a.tar.bz2 |
fold-const.c (fold_real_zero_addition_p): Don't fold a zero addition in the presence of signaling NaNs.
* fold-const.c (fold_real_zero_addition_p): Don't fold a zero
addition in the presence of signaling NaNs.
From-SVN: r63133
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/fold-const.c | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 26807a1..da21d11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-02-19 Roger Sayle <roger@eyesopen.com> + + * fold-const.c (fold_real_zero_addition_p): Don't fold a zero + addition in the presence of signaling NaNs. + 2003-02-19 Krister Walfridsson <cato@df.lth.se> * tm.texi (INIT_CUMULATIVE_ARGS): Fix typo. @@ -109,9 +114,10 @@ Tue Feb 18 23:50:59 CET 2003 Jan Hubicka <jh@suse.cz> (cgraph_expand_function): Rewrite. 2003-02-18 Matt Austern <austern@apple.com> + * toplev.c, langhooks.c, langhooks-def.h: Move write_global_declarations from toplev.c to langhooks.c. - + 2003-02-18 Kazu Hirata <kazu@cs.umass.edu> * config/h8300/h8300.c (general_operand_src): Always check @@ -168,8 +174,8 @@ Tue Feb 18 23:50:59 CET 2003 Jan Hubicka <jh@suse.cz> Tue Feb 18 20:15:54 2003 J"orn Rennecke <joern.rennecke@superh.com> - * sh.c (calc_live_regs): Also check GET_CODE when checking if initial value - for PR_REG is still the PR_REG register. + * sh.c (calc_live_regs): Also check GET_CODE when checking if + initial value for PR_REG is still the PR_REG register. 2003-02-18 Jim Wilson <wilson@redhat.com> diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5dfa1e4..6b50a86 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4642,6 +4642,10 @@ fold_real_zero_addition_p (type, addend, negate) if (!real_zerop (addend)) return false; + /* Don't allow the fold with -fsignaling-nans. */ + if (HONOR_SNANS (TYPE_MODE (type))) + return false; + /* Allow the fold if zeros aren't signed, or their sign isn't important. */ if (!HONOR_SIGNED_ZEROS (TYPE_MODE (type))) return true; |