This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/14851] [4.0 Regression] suboptimal fp division with -ffast-math
- From: "uros at kss-loka dot si" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2004 05:58:02 -0000
- Subject: [Bug rtl-optimization/14851] [4.0 Regression] suboptimal fp division with -ffast-math
- References: <20040405135542.14851.uros@kss-loka.si>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From uros at kss-loka dot si 2004-10-05 05:57 -------
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.
Uros.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14851