]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
x86: Fix tanh ifunc selection
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 12 Mar 2026 14:21:12 +0000 (11:21 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 16 Mar 2026 16:52:21 +0000 (13:52 -0300)
The inclusion of generic tanh implementation without undefining the
libm_alias_double (to provide the __tanh_sse2 implementation) makes
the exported tanh symbol pointing to SSE2 variant.

Reviewed-by: DJ Delorie <dj@redhat.com>
sysdeps/x86_64/fpu/multiarch/s_tanh.c

index ce58e01d3b2e0aff17cba8fa7d440cb383051a07..ec8826f6343e5934fb8d07bda58c0ebf59e57783 100644 (file)
 
 #include <sysdeps/x86/isa-level.h>
 #if MINIMUM_X86_ISA_LEVEL < AVX2_X86_ISA_LEVEL
+#include <libm-alias-double.h>
 
 extern double __redirect_tanh (double);
 
 # define SYMBOL_NAME tanh
 # include "ifunc-fma.h"
 
-libc_ifunc_redirected (__redirect_tanh, __tanh, IFUNC_SELECTOR ());
+libc_ifunc_redirected (__redirect_tanh, tanh, IFUNC_SELECTOR ());
 
 # define __tanh __tanh_sse2
+# undef libm_alias_double
+# define libm_alias_double(a, b)
 #endif
 #include <sysdeps/ieee754/dbl-64/s_tanh.c>