diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-11-05 08:10:01 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-11-05 10:19:37 -0300 |
| commit | 3078358ac6deab75109606f72ad85049703184ad (patch) | |
| tree | 56c2f647b0237c58b8c4fa9f0d5de742212689cf /math | |
| parent | de0e623434fcce907a5be8cc386c95d6b07ba408 (diff) | |
math: Remove the SVID error handling from tgammaf
It improves latency for about 1.5% and throughput for about 2-4%.
Tested on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Diffstat (limited to 'math')
| -rw-r--r-- | math/Versions | 1 | ||||
| -rw-r--r-- | math/w_tgammaf_compat.c | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/math/Versions b/math/Versions index 3afbc427b9..d6ad34f459 100644 --- a/math/Versions +++ b/math/Versions @@ -707,5 +707,6 @@ libm { y0f; y1f; ynf; + tgammaf; } } diff --git a/math/w_tgammaf_compat.c b/math/w_tgammaf_compat.c index 253d0c8b66..b63d646261 100644 --- a/math/w_tgammaf_compat.c +++ b/math/w_tgammaf_compat.c @@ -18,12 +18,13 @@ #include <math_private.h> #include <math-svid-compat.h> #include <libm-alias-float.h> +#include <shlib-compat.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_43) float -__tgammaf(float x) +__tgammaf_svid(float x) { - float y = __ieee754_gammaf_r(x, NULL); + float y = __tgammaf(x); if(__glibc_unlikely (!isfinite (y) || y == 0) && (isfinite (x) || (isinf (x) && x < 0.0f)) @@ -43,5 +44,5 @@ __tgammaf(float x) } return y; } -libm_alias_float (__tgamma, tgamma) +compat_symbol (libm, __tgammaf_svid, tgammaf, GLIBC_2_1); #endif |
