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
This commit is contained in:
Fariborz Jahanian 2004-11-10 17:17:48 +00:00 committed by Fariborz Jahanian
parent d746e87d41
commit d05f9c39a3
3 changed files with 13 additions and 1 deletions

View 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

View 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

View 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)));
}