diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-08-12 01:43:31 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-08-12 01:43:31 +0000 |
commit | af7b5c1c00a3ee89369358ef8a53f4b4b74bbbf9 (patch) | |
tree | 903143e6aa6edea240dc58d6e7bffe3a4e4efee4 /gcc/fold-const.c | |
parent | e3bf220a4651c57a992496ece0e6b96cf2d1bc82 (diff) | |
download | gcc-af7b5c1c00a3ee89369358ef8a53f4b4b74bbbf9.zip gcc-af7b5c1c00a3ee89369358ef8a53f4b4b74bbbf9.tar.gz gcc-af7b5c1c00a3ee89369358ef8a53f4b4b74bbbf9.tar.bz2 |
fold-const.c (fold): Optimize any associative floating point operator with...
* fold-const.c (fold): Optimize any associative floating point
operator with -funsafe-math-optimizations, not just MULT_EXPR.
From-SVN: r70348
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 9333c59..9db9f2e 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5803,13 +5803,11 @@ fold (tree expr) associate: /* In most languages, can't associate operations on floats through parentheses. Rather than remember where the parentheses were, we - don't associate floats at all. It shouldn't matter much. However, - associating multiplications is only very slightly inaccurate, so do - that if -funsafe-math-optimizations is specified. */ + don't associate floats at all, unless the user has specified + -funsafe-math-optimizations. */ if (! wins - && (! FLOAT_TYPE_P (type) - || (flag_unsafe_math_optimizations && code == MULT_EXPR))) + && (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations)) { tree var0, con0, lit0, minus_lit0; tree var1, con1, lit1, minus_lit1; |