This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Third Draft "Unsafe fp optimizations" project description.
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: Third Draft "Unsafe fp optimizations" project description.
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Thu, 9 Aug 2001 16:07:02 -0400 (EDT)
- cc: gcc at gcc dot gnu dot org
- Reply-To: moshier at moshier dot ne dot mediaone dot net
> A*B + A*C -> A*(B+C)
Currently you don't seem to have this available under fast math.
If you want it, here is where the transformation was turned off.
* combine.c (apply_distributive_law): Enable if fast-math.
*** combine.c 2001/08/06 12:46:27 1.1
--- combine.c 2001/08/09 19:57:10
*************** apply_distributive_law (x)
*** 7773,7779 ****
/* Distributivity is not true for floating point.
It can change the value. So don't do it.
-- rms and moshier@world.std.com. */
! if (FLOAT_MODE_P (GET_MODE (x)))
return x;
/* The outer operation can only be one of the following: */
--- 7773,7779 ----
/* Distributivity is not true for floating point.
It can change the value. So don't do it.
-- rms and moshier@world.std.com. */
! if (FLOAT_MODE_P (GET_MODE (x)) && ! flag_fast_math)
return x;
/* The outer operation can only be one of the following: */