This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Optimize pow(x,0.0) = pow(1.0,y) = 1.0
- From: Andrew Pinski <apinski at apple dot com>
- To: Roger Sayle <roger at www dot eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Feb 2003 22:05:11 -0800
- Subject: Re: [PATCH] Optimize pow(x,0.0) = pow(1.0,y) = 1.0
Did you know that pow(0.0, 0.0) != 1.0?
On Thursday, Feb 20, 2003, at 20:10 US/Pacific, Roger Sayle wrote:
The following patch implements the built-in constant folding
optimizations
that "pow(x,0.0) = 1.0" and "pow(1.0,y) = 1.0", even when x and/or y
are
NaN. There are plenty more optimizations to come, but the patch below
is
large enough as it is.
Also does you patch work when fast-math is off, it looks like it does
so you should have a test case for all, including -O0 instead?
Thanks,
Andrew Pinski
apinski at apple dot com
pinskia at physics dot uc dot edu