This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Third Draft "Unsafe fp optimizations" project description.



> 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:  */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]