This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: "Toon Moene" <toon at moene dot indiv dot nluug dot nl>, <gcc at gcc dot gnu dot org>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: "Tim Prince" <tprince at computer dot org>
- Date: Sun, 12 Aug 2001 21:23:53 -0700
- References: <3B7668F6.CF732D77@moene.indiv.nluug.nl>
----- Original Message -----
From: "Toon Moene" <toon@moene.indiv.nluug.nl>
To: <gcc@gcc.gnu.org>
Sent: Sunday, August 12, 2001 4:31 AM
Subject: Fourth Draft "Unsafe fp optimizations" project
description.
>
> Open issues
>
> Currently, GCC outputs `sin' and `cos' instructions instead
of calls to
> library functions on targets that support them (even though
this fact is not
> documented, at least not in md.texi). Those instructions are
only used when
> specifying the -funsafe-math-optimizations flag. This is not
a (C) library
> issue, as can easily be seen by compiling the following
Fortran code on an
> ix86 machine:
>
> READ*,X
> PRINT*,SIN(X)
> END
>
> with and without -funsafe-math-optimizations. Obviously, if
we want to
> continue to support this, we have to come up with a
classification of inputs
> to `sin' and `cos' that makes this change "safe".
>
> We should come up with a further classification for complex
arithmetic.
>
For the NetBurst (P4) architectures, the built-in sin() and
cos() functions are roughly 50% of the speed of optimized
double precision code, although they remain faster than
generic i386 library functions. Built-in sqrt(), of course,
remains preferable.