This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FP negation optimization
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: gcc at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>, Richard Henderson <rth at redhat dot com>
- Date: Sun, 1 Feb 2004 15:05:05 -0800
- Subject: Re: FP negation optimization
- References: <Pine.LNX.4.44.0402011705550.31630-100000@nondot.org>
On Feb 1, 2004, at 15:06, Chris Lattner wrote:
On Sun, 1 Feb 2004, Richard Henderson wrote:
On Sun, Feb 01, 2004 at 02:50:31AM -0600, Chris Lattner wrote:
Is '-0.0 - X' always guaranteed to be the same as '-X' with IEEE
math?
No. X == +0.0 differs.
Are you sure? It seems to work for me, at least on X86:
That is because GCC already optimizes it into -X but using a real old
compiler
which does not optimizes it, 2.95.3,
-0x0.0000000000000p+0 -0x0.0000000000000p+0
0x0.0000000000000p+0 0x0.0000000000000p+0
is produce so it is correct optimization.
Thanks,
Andrew Pinski