about summary refs log tree commit diff
path: root/sysdeps/x86
diff options
context:
space:
mode:
authorSunil K Pandey <skpgkp2@gmail.com>2021-12-29 08:35:22 -0800
committerSunil K Pandey <skpgkp2@gmail.com>2021-12-29 11:37:21 -0800
commit37475ba88303929e85704693455c7294e50aba77 (patch)
tree4defc4412f556258f878588351b27b3b44406fb8 /sysdeps/x86
parent11c01de14c879ffc8dbac8ce32242a7552cbd4ad (diff)
downloadglibc-37475ba88303929e85704693455c7294e50aba77.tar.gz
glibc-37475ba88303929e85704693455c7294e50aba77.tar.xz
glibc-37475ba88303929e85704693455c7294e50aba77.zip
x86-64: Add vector hypot/hypotf implementation to libmvec
Implement vectorized hypot/hypotf containing SSE, AVX, AVX2 and
AVX512 versions for libmvec as per vector ABI.  It also contains
accuracy and ABI tests for vector hypot/hypotf with regenerated ulps.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps/x86')
-rw-r--r--sysdeps/x86/fpu/bits/math-vector.h4
-rw-r--r--sysdeps/x86/fpu/finclude/math-vector-fortran.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/x86/fpu/bits/math-vector.h b/sysdeps/x86/fpu/bits/math-vector.h
index 73cb8849ff..437977c5fd 100644
--- a/sysdeps/x86/fpu/bits/math-vector.h
+++ b/sysdeps/x86/fpu/bits/math-vector.h
@@ -70,6 +70,10 @@
 #  define __DECL_SIMD_asin __DECL_SIMD_x86_64
 #  undef __DECL_SIMD_asinf
 #  define __DECL_SIMD_asinf __DECL_SIMD_x86_64
+#  undef __DECL_SIMD_hypot
+#  define __DECL_SIMD_hypot __DECL_SIMD_x86_64
+#  undef __DECL_SIMD_hypotf
+#  define __DECL_SIMD_hypotf __DECL_SIMD_x86_64
 
 # endif
 #endif
diff --git a/sysdeps/x86/fpu/finclude/math-vector-fortran.h b/sysdeps/x86/fpu/finclude/math-vector-fortran.h
index 4552c2bdfa..cda31479a6 100644
--- a/sysdeps/x86/fpu/finclude/math-vector-fortran.h
+++ b/sysdeps/x86/fpu/finclude/math-vector-fortran.h
@@ -34,6 +34,8 @@
 !GCC$ builtin (atanf) attributes simd (notinbranch) if('x86_64')
 !GCC$ builtin (asin) attributes simd (notinbranch) if('x86_64')
 !GCC$ builtin (asinf) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (hypot) attributes simd (notinbranch) if('x86_64')
+!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x86_64')
 
 !GCC$ builtin (cos) attributes simd (notinbranch) if('x32')
 !GCC$ builtin (cosf) attributes simd (notinbranch) if('x32')
@@ -53,3 +55,5 @@
 !GCC$ builtin (atanf) attributes simd (notinbranch) if('x32')
 !GCC$ builtin (asin) attributes simd (notinbranch) if('x32')
 !GCC$ builtin (asinf) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (hypot) attributes simd (notinbranch) if('x32')
+!GCC$ builtin (hypotf) attributes simd (notinbranch) if('x32')