[Bug target/88556] Inline built-in sinh, cosh, tanh for -ffast-math
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 20 21:35:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88556
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
For any vaguely recent GCC version, the now-removed code in
bits/mathinline.h used __builtin_expm1l.
The key features for this (and much the same applies to the hypot / asinh
/ acosh / atanh inlines which have also been added as x86-specific) are:
* optab to expand expm1l inline (using the x87 f2xm1 instruction, though
it's more complicated than that), respectively to expand expl inline in
one case (and other functions such as log1pl for the inverse hyperbolic
functions).
* Operations including that optab available for a wider type (XFmode in
this case) so that the range of arguments isn't reduced when the inline is
called for a narrower type.
x87 and m68k are the only instruction sets I know to have the relevant
instructions for expanding the expm1 / log1p operations inline, so other
than for hypot this is a case of something theoretically generic but not
so practically useful to make generic.
More information about the Gcc-bugs
mailing list