This is the mail archive of the
mailing list for the GCC project.
Re: Patch gcc-4.0 should not apply mathematical associative rules for addition or multiplication
On Wed, Oct 06, 2004 at 05:05:08PM -0700, Fariborz Jahanian wrote:
> * tree-ssa-dom.c (unsafe_associative_fp_binop): New function.
> (simplify_rhs_and_lookup_avail_expr): Disallow associativity
> and constant folding of floating point MULT_EXPR/PLUS_EXPR
If you apply this, I'll immediately file a PR for a regression
and assign it to you.
You should allow
X op C1 op C2
to combine to
X op C3
if C1 op C2 is exactly representable. Which happens very often.
The information for whether or not C1 op C2 is representable is
available from real.c during the computation of the composite,
so there's absolutely reason not to use it.