Commit 56fe3eff by Doug Kwan Committed by Doug Kwan

re PR rtl-optimization/41574 (Distribute floating point expressions causes bad code [4.4 only])

2009-10-05  Doug Kwan  <dougkwan@google.com>

	PR rtl-optimization/41574
	Index: combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
	floating point and we are not doing unsafe math optimizations.

From-SVN: r152443
parent 9cb26fc5
2009-10-05 Doug Kwan <dougkwan@google.com>
PR rtl-optimization/41574
Index: combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
floating point and we are not doing unsafe math optimizations.
2009-10-03 Simon Baldwin <simonb@google.com> 2009-10-03 Simon Baldwin <simonb@google.com>
Cary Coutant <ccoutant@google.com> Cary Coutant <ccoutant@google.com>
Rafael Espindola <espindola@google.com> Rafael Espindola <espindola@google.com>
...@@ -8811,6 +8811,12 @@ distribute_and_simplify_rtx (rtx x, int n) ...@@ -8811,6 +8811,12 @@ distribute_and_simplify_rtx (rtx x, int n)
enum rtx_code outer_code, inner_code; enum rtx_code outer_code, inner_code;
rtx decomposed, distributed, inner_op0, inner_op1, new_op0, new_op1, tmp; rtx decomposed, distributed, inner_op0, inner_op1, new_op0, new_op1, tmp;
/* Distributivity is not true for floating point as it can change the
value. So we don't do it unless -funsafe-math-optimizations. */
if (FLOAT_MODE_P (GET_MODE (x))
&& ! flag_unsafe_math_optimizations)
return NULL_RTX;
decomposed = XEXP (x, n); decomposed = XEXP (x, n);
if (!ARITHMETIC_P (decomposed)) if (!ARITHMETIC_P (decomposed))
return NULL_RTX; return NULL_RTX;
......
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