diff options
author | Richard Guenther <rguenther@suse.de> | 2008-02-20 14:14:55 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-02-20 14:14:55 +0000 |
commit | 41bb1f06d37ed77ec4b4f88034ac7c16f81f07be (patch) | |
tree | 4f3c12af6c8a7f71b6cb1c2536dd5f7815b793ff /gcc/fold-const.c | |
parent | 2dc0f63301e9bddc5520f2a283d7a8bfdac21fb6 (diff) | |
download | gcc-41bb1f06d37ed77ec4b4f88034ac7c16f81f07be.zip gcc-41bb1f06d37ed77ec4b4f88034ac7c16f81f07be.tar.gz gcc-41bb1f06d37ed77ec4b4f88034ac7c16f81f07be.tar.bz2 |
fold-const.c (split_tree): Associate floatig-point expressions if flag_associative_math is set.
2008-02-20 Richard Guenther <rguenther@suse.de>
* fold-const.c (split_tree): Associate floatig-point expressions
if flag_associative_math is set.
* gcc.dg/fold-reassoc-1.c: New testcase.
* gcc.dg/tree-ssa/recip-3.c: Adjust to not compute d/d.
From-SVN: r132481
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index aba71b6..5d64c17 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1491,7 +1491,7 @@ split_tree (tree in, enum tree_code code, tree *conp, tree *litp, || TREE_CODE (in) == FIXED_CST) *litp = in; else if (TREE_CODE (in) == code - || (! FLOAT_TYPE_P (TREE_TYPE (in)) + || ((! FLOAT_TYPE_P (TREE_TYPE (in)) || flag_associative_math) && ! SAT_FIXED_POINT_TYPE_P (TREE_TYPE (in)) /* We can associate addition and subtraction together (even though the C standard doesn't say so) for integers because |