------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-24 19:26 ------- More from that bug: Roger suggested to move the a/b -> a * (1.0/b) transformation from RTL to tree-ssa (http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02017.html). In this case, transformation could be enhanced to combine multiple divisions, as it is explained in Agner Fog's "How to optimize for the Pentium family of microprocessors", section 3.7.: a1/b1 + a2/b2 can be combined to (a1*b2 + a2*b1) / (b1*b2).
However, there is another bug exposed - when multiplying two constants from constant pool, combiner combines two memory references into const_double. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19150