This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31249] pseudo-optimzation with sincos/cexpi
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2007 10:43:33 -0000
- Subject: [Bug middle-end/31249] pseudo-optimzation with sincos/cexpi
- References: <bug-31249-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-03-19 10:43 -------
There is no option to turn it off. But for !TARGET_C99_FUNCTIONS and
!TARGET_HAS_SINCOS targets it's off. Usually (in fact, for every libm I looked
into), cexp is implemented as
complex double cexp (complex double x)
{
double cos = cos (imag(x));
double sin = sin (imag(x));
double e = 1;
if (real(x) != 0)
e = exp (real(x));
...
possibly computing cos and sin in an efficient way (using sincos). So
cexp () should be never slower than calling sin () and cos (). If the ABI
were not stupid of course ;)
Does darwin have a sincos() library function?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31249