Commit af7b5c1c by Roger Sayle Committed by Roger Sayle

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
parent e3bf220a
2003-08-11 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold): Optimize any associative floating point
operator with -funsafe-math-optimizations, not just MULT_EXPR.
2003-08-11 Kaz Kojima <kkojima@gcc.gnu.org> 2003-08-11 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/lib1funcs.asm (__udivdi3): Add .type and .size * config/sh/lib1funcs.asm (__udivdi3): Add .type and .size
......
...@@ -5803,13 +5803,11 @@ fold (tree expr) ...@@ -5803,13 +5803,11 @@ fold (tree expr)
associate: associate:
/* In most languages, can't associate operations on floats through /* In most languages, can't associate operations on floats through
parentheses. Rather than remember where the parentheses were, we parentheses. Rather than remember where the parentheses were, we
don't associate floats at all. It shouldn't matter much. However, don't associate floats at all, unless the user has specified
associating multiplications is only very slightly inaccurate, so do -funsafe-math-optimizations. */
that if -funsafe-math-optimizations is specified. */
if (! wins if (! wins
&& (! FLOAT_TYPE_P (type) && (! FLOAT_TYPE_P (type) || flag_unsafe_math_optimizations))
|| (flag_unsafe_math_optimizations && code == MULT_EXPR)))
{ {
tree var0, con0, lit0, minus_lit0; tree var0, con0, lit0, minus_lit0;
tree var1, con1, lit1, minus_lit1; tree var1, con1, lit1, minus_lit1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment