re PR tree-optimization/17892 (gcc-4.0 should not reassociate floating point add...
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 10 Nov 2004 17:17:48 +0000 (17:17 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Wed, 10 Nov 2004 17:17:48 +0000 (17:17 +0000)
Fix for PR tree-optimization/17892.
OKed by Roger Sayle.

From-SVN: r90395

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/tree-ssa-dom.c

index 0bacc358c895a7827427aa958879eff0756f26a4..7d842728bedf437e0d07c5515e0c54b95d8a2b3d 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-10  Fariborz Jahanian <fjahanian@apple.com>
+
+       PR tree-optimization/17892
+       * tree-ssa-dom.c (unsafe_associative_fp_binop): Add test for
+       MINUS_EXPR operator.
+
 2004-11-10  James A. Morrison  <phython@gcc.gnu.org>
 
        PR target/18230
index 427d8f4bde9cd492f535829fee984aeb3a15933e..b87577d77630a45155f0c4838d746454a5386388 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-10  Fariborz Jahanian <fjahanian@apple.com>
+
+        * gcc.c-torture/execute/ieee/unsafe-fp-assoc-1.c: 
+       New test for PR tree-optimization/17892.
+
 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/18369
index a7f0aaf0c6161fe3dbdd68622cf9084efbfee665..41138d8073e37a5ff023d22d425162dd345ae3bc 100644 (file)
@@ -1644,7 +1644,8 @@ unsafe_associative_fp_binop (tree exp)
 {
   enum tree_code code = TREE_CODE (exp);
   return !(!flag_unsafe_math_optimizations
-           && (code == MULT_EXPR || code == PLUS_EXPR)
+           && (code == MULT_EXPR || code == PLUS_EXPR
+              || code == MINUS_EXPR)
            && FLOAT_TYPE_P (TREE_TYPE (exp)));
 }