aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2004-11-10 17:17:48 +0000
committerFariborz Jahanian <fjahanian@gcc.gnu.org>2004-11-10 17:17:48 +0000
commitd05f9c39a3a6e7d9a95de9c134d13c1a34f1c70d (patch)
treedeab44c9f7d8b1542981732eb0d8ef16f602e9a1 /gcc/tree-ssa-dom.c
parentd746e87d41548db18c07a1e400f3e446c71f27b4 (diff)
downloadgcc-d05f9c39a3a6e7d9a95de9c134d13c1a34f1c70d.zip
gcc-d05f9c39a3a6e7d9a95de9c134d13c1a34f1c70d.tar.gz
gcc-d05f9c39a3a6e7d9a95de9c134d13c1a34f1c70d.tar.bz2
re PR tree-optimization/17892 (gcc-4.0 should not reassociate floating point add or multiplication)
Fix for PR tree-optimization/17892. OKed by Roger Sayle. From-SVN: r90395
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index a7f0aaf..41138d8 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -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)));
}