From 37475ba88303929e85704693455c7294e50aba77 Mon Sep 17 00:00:00 2001 From: Sunil K Pandey Date: Wed, 29 Dec 2021 08:35:22 -0800 Subject: 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 --- sysdeps/x86/fpu/bits/math-vector.h | 4 ++++ sysdeps/x86/fpu/finclude/math-vector-fortran.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'sysdeps/x86/fpu') 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') -- cgit v1.2.3-70-g09d2