diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-21 14:46:32 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-07-21 14:46:32 -0700 |
commit | 59d9021293ae8e85286df22390eb5e154f6ae207 (patch) | |
tree | b58b162e8f89999df2314afd258da1681a0967bf /gcc | |
parent | ad3a922478a130ba1c684ed4adf9d35cf9c52d5d (diff) | |
download | gcc-59d9021293ae8e85286df22390eb5e154f6ae207.zip gcc-59d9021293ae8e85286df22390eb5e154f6ae207.tar.gz gcc-59d9021293ae8e85286df22390eb5e154f6ae207.tar.bz2 |
(fold): Don't fold X-X to 0 if X is floating point
and !flag_fast_math.
From-SVN: r7786
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 0417aab..fd17f1a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3733,8 +3733,8 @@ fold (expr) Also note that operand_equal_p is always false if an operand is volatile. */ - if (operand_equal_p (arg0, arg1, - FLOAT_TYPE_P (type) && ! flag_fast_math)) + if ((! FLOAT_TYPE_P (type) || flag_fast_math) + && operand_equal_p (arg0, arg1, 0)) return convert (type, integer_zero_node); goto associate; |