[Bug target/89125] Misoptimization of converting sin(x) and cos(x) into sincos(x,&s,&c)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 31 08:20:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89125

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-01-31
                 CC|                            |andreast at gcc dot gnu.org,
                   |                            |gp at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
The middle-end transforms sin/cos to cexp which means C99 support is required.
cexp is then eventually expanded as sincos if the target advertises support
via targetm.libc_has_function (function_sincos) or there is an optab handler
(x87 has sincos IIRC).  If sincos isn't available but the target is C99 we
emit a call to cexp() which hopefully has an optimized path when passed
a realpart zero (the glibc libm does).

FreeBSD folks - can you adjust your targets config if appropriate?


More information about the Gcc-bugs mailing list