This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fourth Draft "Unsafe fp optimizations" project description.



----- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]