This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31723] Use reciprocal and reciprocal square root with -ffast-math
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2007 16:49:26 -0000
- Subject: [Bug middle-end/31723] Use reciprocal and reciprocal square root with -ffast-math
- References: <bug-31723-11659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #17 from ubizjak at gmail dot com 2007-06-10 16:49 -------
(In reply to comment #0)
> /* Mathematically equivalent to 1/sqrt(b*(1/a)) */
> return sqrtf(a/b);
Whoa, this one is a little gem, but ATM in the opposite direction. At least for
-ffast-math we could optimize (a / sqrt (b/c)) into a * sqrt (c/b), thus
loosing one division. I'm sure that richi knows by his heart, how to write this
kind of folding ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31723