Third Draft "Unsafe fp optimizations" project description.
Stephen L Moshier
moshier@mediaone.net
Thu Aug 9 13:07:00 GMT 2001
> 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: */
More information about the Gcc
mailing list