summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/multiarch
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/fpu/multiarch')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core-sse2.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core_sse4.S279
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core-sse.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core_avx2.S289
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core-avx2.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core_avx512.S235
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core-avx2.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core_avx512.S239
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core-sse2.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core_sse4.S265
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core-sse.S20
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core.c28
-rw-r--r--sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core_avx2.S269
18 files changed, 1864 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core-sse2.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core-sse2.S
new file mode 100644
index 0000000000..237e38459e
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core-sse2.S
@@ -0,0 +1,20 @@
+/* SSE2 version of vectorized hypot.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVbN2vv_hypot _ZGVbN2vv_hypot_sse2
+#include "../svml_d_hypot2_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core.c b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core.c
new file mode 100644
index 0000000000..3f0865f05d
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized hypot, vector length is 2.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVbN2vv_hypot
+#include "ifunc-mathvec-sse4_1.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVbN2vv_hypot, __GI__ZGVbN2vv_hypot,
+	       __redirect__ZGVbN2vv_hypot)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core_sse4.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core_sse4.S
new file mode 100644
index 0000000000..931f34e5f2
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot2_core_sse4.S
@@ -0,0 +1,279 @@
+/* Function hypot vectorized with SSE4.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate error = z*(rsqrt(z)*rsqrt(z)) - 1
+ *      Calculate fixing part p with polynom
+ *      Fix answer with sqrt(z) = z * rsqrt(z) + error * p * z
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [3BC ; 441] else goto Callout
+ *
+ *    _s  ~ 1.0/sqrt(_z)
+ *    _s2 ~ 1.0/(sqrt(_z)*sqrt(_z)) ~ 1.0/_z = (1.0/_z + O)
+ *    _e[rror]  =  (1.0/_z + O) * _z - 1.0
+ *    calculate fixing part _p
+ *    _p = (((_POLY_C5*_e + _POLY_C4)*_e +_POLY_C3)*_e +_POLY_C2)*_e + _POLY_C1
+ *    some parts of polynom are skipped for lower flav
+ *
+ *    result = _z * (1.0/sqrt(_z) + O) + _p * _e[rror] * _z
+ *
+ *
+ */
+
+/* Offsets for data table __svml_dhypot_data_internal
+ */
+#define _dHiLoMask                    	0
+#define _dAbsMask                     	16
+#define _dOne                         	32
+#define _POLY_C5                      	48
+#define _POLY_C4                      	64
+#define _POLY_C3                      	80
+#define _POLY_C2                      	96
+#define _POLY_C1                      	112
+#define _LowBoundary                  	128
+#define _HighBoundary                 	144
+
+#include <sysdep.h>
+
+        .text
+	.section .text.sse4,"ax",@progbits
+ENTRY(_ZGVbN2vv_hypot_sse4)
+        subq      $88, %rsp
+        cfi_def_cfa_offset(96)
+
+/*
+ *  Defines
+ *  Implementation
+ * Multiprecision branch for _HA_ only
+ * _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ */
+        movaps    %xmm0, %xmm10
+        movaps    %xmm1, %xmm2
+        mulpd     %xmm0, %xmm10
+        mulpd     %xmm1, %xmm2
+        addpd     %xmm2, %xmm10
+
+/*
+ * _s  ~ 1.0/sqrt(_z)
+ * _s2 ~ 1.0/(sqrt(_z)*sqrt(_z)) ~ 1.0/_z
+ */
+        cvtpd2ps  %xmm10, %xmm7
+        movlhps   %xmm7, %xmm7
+        rsqrtps   %xmm7, %xmm8
+        cvtps2pd  %xmm8, %xmm11
+        movaps    %xmm11, %xmm2
+        mulpd     %xmm11, %xmm2
+
+/* _e[rror]  ~  (1.0/_z + O) * _z - 1.0 */
+        mulpd     %xmm10, %xmm2
+        subpd     _dOne+__svml_dhypot_data_internal(%rip), %xmm2
+
+/*
+ * calculate fixing part _p
+ * _p = (((_POLY_C5*_e + _POLY_C4)*_e +_POLY_C3)*_e +_POLY_C2)*_e + _POLY_C1
+ * some parts of polynom are skipped for lower flav
+ */
+        movups    _POLY_C4+__svml_dhypot_data_internal(%rip), %xmm9
+        mulpd     %xmm2, %xmm9
+        addpd     _POLY_C3+__svml_dhypot_data_internal(%rip), %xmm9
+        mulpd     %xmm2, %xmm9
+        addpd     _POLY_C2+__svml_dhypot_data_internal(%rip), %xmm9
+        mulpd     %xmm2, %xmm9
+        addpd     _POLY_C1+__svml_dhypot_data_internal(%rip), %xmm9
+
+/* result = _z * (1.0/sqrt(_z) + O) + _p * _e[rror] * _z */
+        mulpd     %xmm9, %xmm2
+        mulpd     %xmm11, %xmm2
+        mulpd     %xmm10, %xmm11
+        mulpd     %xmm10, %xmm2
+
+/* Check _z exponent to be withing borders [3BC ; 441] else goto Callout */
+        movq      _LowBoundary+__svml_dhypot_data_internal(%rip), %xmm5
+        movq      _HighBoundary+__svml_dhypot_data_internal(%rip), %xmm3
+        pshufd    $221, %xmm10, %xmm4
+        pcmpgtd   %xmm4, %xmm5
+        pcmpgtd   %xmm3, %xmm4
+        por       %xmm4, %xmm5
+        pshufd    $80, %xmm5, %xmm6
+        movmskpd  %xmm6, %edx
+        addpd     %xmm11, %xmm2
+
+/*  The end of implementation  */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx rbp r12 r13 r14 r15 edx xmm0 xmm1 xmm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        movaps    %xmm2, %xmm0
+        addq      $88, %rsp
+        cfi_def_cfa_offset(8)
+        ret
+        cfi_def_cfa_offset(96)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        movups    %xmm0, 32(%rsp)
+        movups    %xmm1, 48(%rsp)
+        movups    %xmm2, 64(%rsp)
+                                # LOE rbx rbp r12 r13 r14 r15 edx
+
+        xorl      %eax, %eax
+        movq      %r12, 16(%rsp)
+        cfi_offset(12, -80)
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        cfi_offset(13, -88)
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        cfi_offset(14, -96)
+                                # LOE rbx rbp r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx rbp r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $2, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx rbp r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        movups    64(%rsp), %xmm2
+
+/* Go to exit */
+        jmp       L(EXIT)
+        cfi_offset(12, -80)
+        cfi_offset(13, -88)
+        cfi_offset(14, -96)
+                                # LOE rbx rbp r12 r13 r14 r15 xmm2
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movsd     32(%rsp,%r14,8), %xmm0
+        movsd     48(%rsp,%r14,8), %xmm1
+        call      hypot@PLT
+                                # LOE rbx rbp r14 r15 r12d r13d xmm0
+
+        movsd     %xmm0, 64(%rsp,%r14,8)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx rbp r15 r12d r13d
+END(_ZGVbN2vv_hypot_sse4)
+
+        .section .rodata, "a"
+        .align 16
+
+#ifdef __svml_dhypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(16)) VUINT32 _dHiLoMask[2][2];
+        __declspec(align(16)) VUINT32 _dAbsMask[2][2];
+        __declspec(align(16)) VUINT32 _dOne[2][2];
+        __declspec(align(16)) VUINT32 _POLY_C5[2][2];
+        __declspec(align(16)) VUINT32 _POLY_C4[2][2];
+        __declspec(align(16)) VUINT32 _POLY_C3[2][2];
+        __declspec(align(16)) VUINT32 _POLY_C2[2][2];
+        __declspec(align(16)) VUINT32 _POLY_C1[2][2];
+        __declspec(align(16)) VUINT32 _LowBoundary[4][1];
+        __declspec(align(16)) VUINT32 _HighBoundary[4][1];
+} __svml_dhypot_data_internal;
+#endif
+__svml_dhypot_data_internal:
+        /* legacy algorithm */
+        .quad 0xffffc00000000000, 0xffffc00000000000       /* _dHiLoMask     */
+        .align 16
+        .quad 0x7fffffffffffffff, 0x7fffffffffffffff       /* _dAbsMask      */
+        .align 16
+        .quad 0x3FF0000000000000, 0x3FF0000000000000       /* _dOne          */
+        .align 16
+        .quad 0xBFCF800000000000, 0xBFCF800000000000       /* _POLY_C5            */
+        .align 16
+        .quad 0x3FD1800000000000, 0x3FD1800000000000       /* _POLY_C4            */
+        .align 16
+        .quad 0xBFD4000000000000, 0xBFD4000000000000       /* _POLY_C3            */
+        .align 16
+        .quad 0x3FD8000000000000, 0x3FD8000000000000       /* _POLY_C2            */
+        .align 16
+        .quad 0xBFE0000000000000, 0xBFE0000000000000       /* _POLY_C1            */
+        .align 16
+        .long 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000       /* _LowBoundary   */
+        .align 16
+        .long 0x44100000, 0x44100000, 0x44100000, 0x44100000       /* _HighBoundary  */
+        .align 16
+        .type	__svml_dhypot_data_internal,@object
+        .size	__svml_dhypot_data_internal,.-__svml_dhypot_data_internal
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core-sse.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core-sse.S
new file mode 100644
index 0000000000..5e7c75c44c
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core-sse.S
@@ -0,0 +1,20 @@
+/* SSE version of vectorized hypot.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVdN4vv_hypot _ZGVdN4vv_hypot_sse_wrapper
+#include "../svml_d_hypot4_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core.c b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core.c
new file mode 100644
index 0000000000..06f34d35e1
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized hypot, vector length is 4.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVdN4vv_hypot
+#include "ifunc-mathvec-avx2.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVdN4vv_hypot, __GI__ZGVdN4vv_hypot,
+	       __redirect__ZGVdN4vv_hypot)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core_avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core_avx2.S
new file mode 100644
index 0000000000..45028ab7e9
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot4_core_avx2.S
@@ -0,0 +1,289 @@
+/* Function hypot vectorized with AVX2.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate error = z*(rsqrt(z)*rsqrt(z)) - 1
+ *      Calculate fixing part p with polynom
+ *      Fix answer with sqrt(z) = z * rsqrt(z) + error * p * z
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [3BC ; 441] else goto Callout
+ *
+ *    _s  ~ 1.0/sqrt(_z)
+ *    _s2 ~ 1.0/(sqrt(_z)*sqrt(_z)) ~ 1.0/_z = (1.0/_z + O)
+ *    _e[rror]  =  (1.0/_z + O) * _z - 1.0
+ *    calculate fixing part _p
+ *    _p = (((_POLY_C5*_e + _POLY_C4)*_e +_POLY_C3)*_e +_POLY_C2)*_e + _POLY_C1
+ *    some parts of polynom are skipped for lower flav
+ *
+ *    result = _z * (1.0/sqrt(_z) + O) + _p * _e[rror] * _z
+ *
+ *
+ */
+
+/* Offsets for data table __svml_dhypot_data_internal
+ */
+#define _dHiLoMask                    	0
+#define _dAbsMask                     	32
+#define _dOne                         	64
+#define _POLY_C5                      	96
+#define _POLY_C4                      	128
+#define _POLY_C3                      	160
+#define _POLY_C2                      	192
+#define _POLY_C1                      	224
+#define _LowBoundary                  	256
+#define _HighBoundary                 	288
+
+#include <sysdep.h>
+
+        .text
+	.section .text.avx2,"ax",@progbits
+ENTRY(_ZGVdN4vv_hypot_avx2)
+        pushq     %rbp
+        cfi_def_cfa_offset(16)
+        movq      %rsp, %rbp
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+        andq      $-32, %rsp
+        subq      $128, %rsp
+        vmovapd   %ymm1, %ymm2
+        vmovapd   %ymm0, %ymm1
+
+/*
+ *  Defines
+ *  Implementation
+ * Multiprecision branch for _HA_ only
+ * _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ */
+        vmulpd    %ymm1, %ymm1, %ymm0
+
+/*
+ * calculate fixing part _p
+ * _p = (((_POLY_C5*_e + _POLY_C4)*_e +_POLY_C3)*_e +_POLY_C2)*_e + _POLY_C1
+ * some parts of polynom are skipped for lower flav
+ */
+        vmovupd   _POLY_C4+__svml_dhypot_data_internal(%rip), %ymm15
+        vmovups   _LowBoundary+__svml_dhypot_data_internal(%rip), %xmm4
+        vfmadd231pd %ymm2, %ymm2, %ymm0
+
+/*
+ * _s  ~ 1.0/sqrt(_z)
+ * _s2 ~ 1.0/(sqrt(_z)*sqrt(_z)) ~ 1.0/_z
+ */
+        vcvtpd2ps %ymm0, %xmm12
+
+/* Check _z exponent to be withing borders [3BC ; 441] else goto Callout */
+        vextractf128 $1, %ymm0, %xmm3
+        vrsqrtps  %xmm12, %xmm13
+        vshufps   $221, %xmm3, %xmm0, %xmm5
+        vcvtps2pd %xmm13, %ymm3
+        vpcmpgtd  %xmm5, %xmm4, %xmm6
+        vpcmpgtd  _HighBoundary+__svml_dhypot_data_internal(%rip), %xmm5, %xmm7
+        vpor      %xmm7, %xmm6, %xmm9
+        vpshufd   $80, %xmm9, %xmm8
+        vmulpd    %ymm3, %ymm3, %ymm14
+        vpshufd   $250, %xmm9, %xmm10
+
+/* _e[rror]  ~  (1.0/_z + O) * _z - 1.0 */
+        vfmsub213pd _dOne+__svml_dhypot_data_internal(%rip), %ymm0, %ymm14
+        vfmadd213pd _POLY_C3+__svml_dhypot_data_internal(%rip), %ymm14, %ymm15
+        vfmadd213pd _POLY_C2+__svml_dhypot_data_internal(%rip), %ymm14, %ymm15
+        vfmadd213pd _POLY_C1+__svml_dhypot_data_internal(%rip), %ymm14, %ymm15
+
+/* result = _z * (1.0/sqrt(_z) + O) + _p * _e[rror] * _z */
+        vmulpd    %ymm15, %ymm14, %ymm14
+        vmulpd    %ymm14, %ymm3, %ymm15
+        vmulpd    %ymm15, %ymm0, %ymm4
+        vfmadd213pd %ymm4, %ymm3, %ymm0
+        vinsertf128 $1, %xmm10, %ymm8, %ymm11
+        vmovmskpd %ymm11, %edx
+
+/*  The end of implementation  */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx r12 r13 r14 r15 edx ymm0 ymm1 ymm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        movq      %rbp, %rsp
+        popq      %rbp
+        cfi_def_cfa(7, 8)
+        cfi_restore(6)
+        ret
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        vmovupd   %ymm1, 32(%rsp)
+        vmovupd   %ymm2, 64(%rsp)
+        vmovupd   %ymm0, 96(%rsp)
+                                # LOE rbx r12 r13 r14 r15 edx ymm0
+
+        xorl      %eax, %eax
+                                # LOE rbx r12 r13 r14 r15 eax edx
+
+        vzeroupper
+        movq      %r12, 16(%rsp)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -112; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x90, 0xff, 0xff, 0xff, 0x22
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -120; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x88, 0xff, 0xff, 0xff, 0x22
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -128; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x80, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $4, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        vmovupd   96(%rsp), %ymm0
+
+/* Go to exit */
+        jmp       L(EXIT)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -112; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x90, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -120; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x88, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -128; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x80, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r12 r13 r14 r15 ymm0
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movsd     32(%rsp,%r14,8), %xmm0
+        movsd     64(%rsp,%r14,8), %xmm1
+        call      hypot@PLT
+                                # LOE rbx r14 r15 r12d r13d xmm0
+
+        movsd     %xmm0, 96(%rsp,%r14,8)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx r15 r12d r13d
+END(_ZGVdN4vv_hypot_avx2)
+
+        .section .rodata, "a"
+        .align 32
+
+#ifdef __svml_dhypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(32)) VUINT32 _dHiLoMask[4][2];
+        __declspec(align(32)) VUINT32 _dAbsMask[4][2];
+        __declspec(align(32)) VUINT32 _dOne[4][2];
+        __declspec(align(32)) VUINT32 _POLY_C5[4][2];
+        __declspec(align(32)) VUINT32 _POLY_C4[4][2];
+        __declspec(align(32)) VUINT32 _POLY_C3[4][2];
+        __declspec(align(32)) VUINT32 _POLY_C2[4][2];
+        __declspec(align(32)) VUINT32 _POLY_C1[4][2];
+        __declspec(align(32)) VUINT32 _LowBoundary[8][1];
+        __declspec(align(32)) VUINT32 _HighBoundary[8][1];
+} __svml_dhypot_data_internal;
+#endif
+__svml_dhypot_data_internal:
+        /* legacy algorithm */
+        .quad 0xffffc00000000000, 0xffffc00000000000, 0xffffc00000000000, 0xffffc00000000000       /* _dHiLoMask     */
+        .align 32
+        .quad 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff       /* _dAbsMask      */
+        .align 32
+        .quad 0x3FF0000000000000, 0x3FF0000000000000, 0x3FF0000000000000, 0x3FF0000000000000       /* _dOne          */
+        .align 32
+        .quad 0xBFCF800000000000, 0xBFCF800000000000, 0xBFCF800000000000, 0xBFCF800000000000       /* _POLY_C5            */
+        .align 32
+        .quad 0x3FD1800000000000, 0x3FD1800000000000, 0x3FD1800000000000, 0x3FD1800000000000       /* _POLY_C4            */
+        .align 32
+        .quad 0xBFD4000000000000, 0xBFD4000000000000, 0xBFD4000000000000, 0xBFD4000000000000       /* _POLY_C3            */
+        .align 32
+        .quad 0x3FD8000000000000, 0x3FD8000000000000, 0x3FD8000000000000, 0x3FD8000000000000       /* _POLY_C2            */
+        .align 32
+        .quad 0xBFE0000000000000, 0xBFE0000000000000, 0xBFE0000000000000, 0xBFE0000000000000       /* _POLY_C1            */
+        .align 32
+        .long 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000, 0x3BC00000       /* _LowBoundary   */
+        .align 32
+        .long 0x44100000, 0x44100000, 0x44100000, 0x44100000, 0x44100000, 0x44100000, 0x44100000, 0x44100000       /* _HighBoundary  */
+        .align 32
+        .type	__svml_dhypot_data_internal,@object
+        .size	__svml_dhypot_data_internal,.-__svml_dhypot_data_internal
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core-avx2.S
new file mode 100644
index 0000000000..a53e82cf9a
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core-avx2.S
@@ -0,0 +1,20 @@
+/* AVX2 version of vectorized hypot.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVeN8vv_hypot _ZGVeN8vv_hypot_avx2_wrapper
+#include "../svml_d_hypot8_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core.c b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core.c
new file mode 100644
index 0000000000..6052c752c9
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized hypot, vector length is 8.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVeN8vv_hypot
+#include "ifunc-mathvec-avx512-skx.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVeN8vv_hypot, __GI__ZGVeN8vv_hypot,
+	       __redirect__ZGVeN8vv_hypot)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core_avx512.S
new file mode 100644
index 0000000000..1e5e716a8d
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_d_hypot8_core_avx512.S
@@ -0,0 +1,235 @@
+/* Function hypot vectorized with AVX-512.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate error = z*(rsqrt(z)*rsqrt(z)) - 1
+ *      Calculate fixing part p with polynom
+ *      Fix answer with sqrt(z) = z * rsqrt(z) + error * p * z
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [3BC ; 441] else goto Callout
+ *
+ *    _s  ~ 1.0/sqrt(_z)
+ *    _s2 ~ 1.0/(sqrt(_z)*sqrt(_z)) ~ 1.0/_z = (1.0/_z + O)
+ *    _e[rror]  =  (1.0/_z + O) * _z - 1.0
+ *    calculate fixing part _p
+ *    _p = (((_POLY_C5*_e + _POLY_C4)*_e +_POLY_C3)*_e +_POLY_C2)*_e + _POLY_C1
+ *    some parts of polynom are skipped for lower flav
+ *
+ *    result = _z * (1.0/sqrt(_z) + O) + _p * _e[rror] * _z
+ *
+ *
+ */
+
+/* Offsets for data table __svml_dhypot_data_internal
+ */
+#define _dAbsMask                     	0
+#define _lExpBound_uisa               	64
+#define _lExpBound                    	128
+#define _dHalf                        	192
+
+#include <sysdep.h>
+
+        .text
+	.section .text.evex512,"ax",@progbits
+ENTRY(_ZGVeN8vv_hypot_skx)
+        pushq     %rbp
+        cfi_def_cfa_offset(16)
+        movq      %rsp, %rbp
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+        andq      $-64, %rsp
+        subq      $256, %rsp
+        vgetexppd {sae}, %zmm0, %zmm2
+        vgetexppd {sae}, %zmm1, %zmm3
+        vmovups   _dHalf+__svml_dhypot_data_internal(%rip), %zmm9
+        vmaxpd    {sae}, %zmm3, %zmm2, %zmm4
+        vmulpd    {rn-sae}, %zmm0, %zmm0, %zmm2
+        vandpd    _dAbsMask+__svml_dhypot_data_internal(%rip), %zmm4, %zmm5
+        vfmadd231pd {rn-sae}, %zmm1, %zmm1, %zmm2
+
+/* Select exponent bound so that no scaling is needed */
+        vpcmpq    $5, _lExpBound_uisa+__svml_dhypot_data_internal(%rip), %zmm5, %k0
+        vrsqrt14pd %zmm2, %zmm6
+        kmovw     %k0, %edx
+        vmulpd    {rn-sae}, %zmm6, %zmm2, %zmm7
+        vmulpd    {rn-sae}, %zmm6, %zmm9, %zmm8
+        vfnmadd231pd {rn-sae}, %zmm7, %zmm8, %zmm9
+        vfmadd231pd {rn-sae}, %zmm9, %zmm8, %zmm8
+        vfmadd213pd {rn-sae}, %zmm7, %zmm7, %zmm9
+        vfnmadd231pd {rn-sae}, %zmm9, %zmm9, %zmm2
+        vfmadd213pd {rn-sae}, %zmm9, %zmm8, %zmm2
+
+/*  The end of implementation  */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx r12 r13 r14 r15 edx zmm0 zmm1 zmm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        vmovaps   %zmm2, %zmm0
+        movq      %rbp, %rsp
+        popq      %rbp
+        cfi_def_cfa(7, 8)
+        cfi_restore(6)
+        ret
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        vmovups   %zmm0, 64(%rsp)
+        vmovups   %zmm1, 128(%rsp)
+        vmovups   %zmm2, 192(%rsp)
+                                # LOE rbx r12 r13 r14 r15 edx zmm2
+
+        xorl      %eax, %eax
+                                # LOE rbx r12 r13 r14 r15 eax edx
+
+        vzeroupper
+        movq      %r12, 16(%rsp)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -240; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x10, 0xff, 0xff, 0xff, 0x22
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -248; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x08, 0xff, 0xff, 0xff, 0x22
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -256; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x00, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $8, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        vmovups   192(%rsp), %zmm2
+
+/* Go to exit */
+        jmp       L(EXIT)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -240; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x10, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -248; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x08, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -256; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x00, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r12 r13 r14 r15 zmm2
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movsd     64(%rsp,%r14,8), %xmm0
+        movsd     128(%rsp,%r14,8), %xmm1
+        call      hypot@PLT
+                                # LOE rbx r14 r15 r12d r13d xmm0
+
+        movsd     %xmm0, 192(%rsp,%r14,8)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx r15 r12d r13d
+END(_ZGVeN8vv_hypot_skx)
+
+        .section .rodata, "a"
+        .align 64
+
+#ifdef __svml_dhypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(64)) VUINT32 _dAbsMask[8][2];
+        __declspec(align(64)) VUINT32 _lExpBound_uisa[8][2];
+        __declspec(align(64)) VUINT32 _lExpBound[8][2];
+        __declspec(align(64)) VUINT32 _dHalf[8][2];
+} __svml_dhypot_data_internal;
+#endif
+__svml_dhypot_data_internal:
+        /* legacy algorithm */
+        .quad 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff, 0x7fffffffffffffff       /* _dAbsMask      */
+        /* fma based algorithm*/
+        .align 64
+        .quad 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000, 0x407ff00000000000       /* _lExpBound_uisa */
+        .align 64
+        .quad 0x404f800000000000, 0x404f800000000000, 0x404f800000000000, 0x404f800000000000, 0x404f800000000000, 0x404f800000000000, 0x404f800000000000, 0x404f800000000000       /* _lExpBound      */
+        .align 64
+        .quad 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000, 0x3FE0000000000000       /* _dHalf          */
+        .align 64
+        .type	__svml_dhypot_data_internal,@object
+        .size	__svml_dhypot_data_internal,.-__svml_dhypot_data_internal
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core-avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core-avx2.S
new file mode 100644
index 0000000000..a6ba40df4d
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core-avx2.S
@@ -0,0 +1,20 @@
+/* AVX2 version of vectorized hypotf.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVeN16vv_hypotf _ZGVeN16vv_hypotf_avx2_wrapper
+#include "../svml_s_hypotf16_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core.c b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core.c
new file mode 100644
index 0000000000..0c9eb6a364
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized hypotf, vector length is 16.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVeN16vv_hypotf
+#include "ifunc-mathvec-avx512-skx.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVeN16vv_hypotf, __GI__ZGVeN16vv_hypotf,
+	       __redirect__ZGVeN16vv_hypotf)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core_avx512.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core_avx512.S
new file mode 100644
index 0000000000..46a156d136
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf16_core_avx512.S
@@ -0,0 +1,239 @@
+/* Function hypotf vectorized with AVX-512.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate make two NR iterations
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [1E3 ; 60A] else goto Callout
+ *
+ *    Compute resciplicle sqrt s0 ~ 1.0/sqrt(_z),
+ *      that multiplied by _z, is final result for _EP_ version.
+ *
+ *    First iteration (or zero iteration):
+ *       s =  z * s0
+ *       h = .5 * s0
+ *       d =  s *  h - .5
+ *
+ *    Second iteration:
+ *       h = d * h + h
+ *       s = s * d + s
+ *       d = s * s - z (in multiprecision for _HA_)
+ *
+ *    result = s - h * d
+ *
+ *    EP version of the function can be implemented as y[i]=sqrt(a[i]^2+b[i]^2)
+ *    with all intermediate operations done in target precision for i=1,..,n.
+ *    It can return result y[i]=0 in case a[i]^2 and b[i]^2 underflow in target
+ *    precision (for some i). It can return result y[i]=NAN in case
+ *    a[i]^2+b[i]^2 overflow in target precision, for some i. It can return
+ *    result y[i]=NAN in case a[i] or b[i] is infinite, for some i.
+ *
+ *
+ */
+
+/* Offsets for data table __svml_shypot_data_internal
+ */
+#define _sAbsMask                     	0
+#define _sHalf                        	64
+#define _iExpBound                    	128
+
+#include <sysdep.h>
+
+        .text
+	.section .text.exex512,"ax",@progbits
+ENTRY(_ZGVeN16vv_hypotf_skx)
+        pushq     %rbp
+        cfi_def_cfa_offset(16)
+        movq      %rsp, %rbp
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+        andq      $-64, %rsp
+        subq      $256, %rsp
+        vgetexpps {sae}, %zmm0, %zmm2
+        vgetexpps {sae}, %zmm1, %zmm3
+        vmovups   _sHalf+__svml_shypot_data_internal(%rip), %zmm6
+        vmaxps    {sae}, %zmm3, %zmm2, %zmm4
+        vmulps    {rn-sae}, %zmm0, %zmm0, %zmm2
+        vandps    _sAbsMask+__svml_shypot_data_internal(%rip), %zmm4, %zmm5
+        vfmadd231ps {rn-sae}, %zmm1, %zmm1, %zmm2
+        vpcmpd    $5, _iExpBound+__svml_shypot_data_internal(%rip), %zmm5, %k0
+        vrsqrt14ps %zmm2, %zmm7
+        kmovw     %k0, %edx
+        vmulps    {rn-sae}, %zmm7, %zmm2, %zmm9
+        vmulps    {rn-sae}, %zmm7, %zmm6, %zmm8
+        vfnmadd231ps {rn-sae}, %zmm9, %zmm9, %zmm2
+        vfmadd213ps {rn-sae}, %zmm9, %zmm8, %zmm2
+
+/*
+ * VSCALEF( S, _VRES1, _VRES1, sExp );
+ *  The end of implementation
+ */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx r12 r13 r14 r15 edx zmm0 zmm1 zmm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        vmovaps   %zmm2, %zmm0
+        movq      %rbp, %rsp
+        popq      %rbp
+        cfi_def_cfa(7, 8)
+        cfi_restore(6)
+        ret
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        vmovups   %zmm0, 64(%rsp)
+        vmovups   %zmm1, 128(%rsp)
+        vmovups   %zmm2, 192(%rsp)
+                                # LOE rbx r12 r13 r14 r15 edx zmm2
+
+        xorl      %eax, %eax
+                                # LOE rbx r12 r13 r14 r15 eax edx
+
+        vzeroupper
+        movq      %r12, 16(%rsp)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -240; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x10, 0xff, 0xff, 0xff, 0x22
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -248; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x08, 0xff, 0xff, 0xff, 0x22
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -256; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x00, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $16, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        vmovups   192(%rsp), %zmm2
+
+/* Go to exit */
+        jmp       L(EXIT)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -240; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x10, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -248; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x08, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -64; DW_OP_and; DW_OP_const4s: -256; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xc0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x00, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r12 r13 r14 r15 zmm2
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movss     64(%rsp,%r14,4), %xmm0
+        movss     128(%rsp,%r14,4), %xmm1
+        call      hypotf@PLT
+                                # LOE rbx r14 r15 r12d r13d xmm0
+
+        movss     %xmm0, 192(%rsp,%r14,4)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx r15 r12d r13d
+END(_ZGVeN16vv_hypotf_skx)
+
+        .section .rodata, "a"
+        .align 64
+
+#ifdef __svml_shypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(64)) VUINT32 _sAbsMask[16][1];
+        __declspec(align(64)) VUINT32 _sHalf[16][1];
+        __declspec(align(64)) VUINT32 _iExpBound[16][1];
+} __svml_shypot_data_internal;
+#endif
+__svml_shypot_data_internal:
+        .long 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff  /* _sAbsMask      */
+        .align 64
+        .long 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000  /* _sHalf         */
+        /* fma based algorithm*/
+        .align 64
+        .long 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000, 0x427C0000  /* _iExpBound     */
+        .align 64
+        .type	__svml_shypot_data_internal,@object
+        .size	__svml_shypot_data_internal,.-__svml_shypot_data_internal
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core-sse2.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core-sse2.S
new file mode 100644
index 0000000000..5e9dd22d94
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core-sse2.S
@@ -0,0 +1,20 @@
+/* SSE2 version of vectorized hypotf.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVbN4vv_hypotf _ZGVbN4vv_hypotf_sse2
+#include "../svml_s_hypotf4_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core.c b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core.c
new file mode 100644
index 0000000000..91c9f5ca3f
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized hypotf, vector length is 4.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVbN4vv_hypotf
+#include "ifunc-mathvec-sse4_1.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVbN4vv_hypotf, __GI__ZGVbN4vv_hypotf,
+	       __redirect__ZGVbN4vv_hypotf)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core_sse4.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core_sse4.S
new file mode 100644
index 0000000000..a3f6d21ce1
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf4_core_sse4.S
@@ -0,0 +1,265 @@
+/* Function hypotf vectorized with SSE4.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate make two NR iterations
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [1E3 ; 60A] else goto Callout
+ *
+ *    Compute resciplicle sqrt s0 ~ 1.0/sqrt(_z),
+ *      that multiplied by _z, is final result for _EP_ version.
+ *
+ *    First iteration (or zero iteration):
+ *       s =  z * s0
+ *       h = .5 * s0
+ *       d =  s *  h - .5
+ *
+ *    Second iteration:
+ *       h = d * h + h
+ *       s = s * d + s
+ *       d = s * s - z (in multiprecision for _HA_)
+ *
+ *    result = s - h * d
+ *
+ *    EP version of the function can be implemented as y[i]=sqrt(a[i]^2+b[i]^2)
+ *    with all intermediate operations done in target precision for i=1,..,n.
+ *    It can return result y[i]=0 in case a[i]^2 and b[i]^2 underflow in target
+ *    precision (for some i). It can return result y[i]=NAN in case
+ *    a[i]^2+b[i]^2 overflow in target precision, for some i. It can return
+ *    result y[i]=NAN in case a[i] or b[i] is infinite, for some i.
+ *
+ *
+ */
+
+/* Offsets for data table __svml_shypot_data_internal
+ */
+#define _sHiLoMask                    	0
+#define _sAbsMask                     	16
+#define _sHalf                        	32
+#define _LowBoundary                  	48
+#define _HighBoundary                 	64
+
+#include <sysdep.h>
+
+        .text
+	.section .text.sse4,"ax",@progbits
+ENTRY(_ZGVbN4vv_hypotf_sse4)
+        subq      $88, %rsp
+        cfi_def_cfa_offset(96)
+
+/*
+ *  Implementation
+ * Multiprecision branch for _HA_ only
+ * No multiprecision branch for _LA_
+ * _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ */
+        movaps    %xmm0, %xmm8
+        movaps    %xmm1, %xmm2
+        mulps     %xmm0, %xmm8
+        mulps     %xmm1, %xmm2
+
+/*
+ *  Variables
+ *  Defines
+ *  Constants loading
+ */
+        movups    _sHalf+__svml_shypot_data_internal(%rip), %xmm5
+        addps     %xmm2, %xmm8
+
+/* _s0  ~ 1.0/sqrt(_z) */
+        rsqrtps   %xmm8, %xmm10
+
+/* First iteration */
+        movaps    %xmm10, %xmm2
+        movaps    %xmm8, %xmm3
+        mulps     %xmm8, %xmm2
+        mulps     %xmm5, %xmm10
+        movaps    %xmm2, %xmm6
+        mulps     %xmm10, %xmm6
+
+/* Check _z exponent to be withing borders [1E3 ; 60A] else goto Callout */
+        movdqu    _LowBoundary+__svml_shypot_data_internal(%rip), %xmm4
+        subps     %xmm6, %xmm5
+
+/* Second iteration */
+        movaps    %xmm5, %xmm7
+        pcmpgtd   %xmm8, %xmm4
+        mulps     %xmm2, %xmm5
+        mulps     %xmm10, %xmm7
+        addps     %xmm5, %xmm2
+        addps     %xmm7, %xmm10
+
+/* Finish second iteration in native precision for _LA_ */
+        movaps    %xmm2, %xmm9
+        mulps     %xmm2, %xmm9
+        pcmpgtd   _HighBoundary+__svml_shypot_data_internal(%rip), %xmm3
+        subps     %xmm8, %xmm9
+        mulps     %xmm9, %xmm10
+        por       %xmm3, %xmm4
+        movmskps  %xmm4, %edx
+        subps     %xmm10, %xmm2
+
+/*  The end of implementation  */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx rbp r12 r13 r14 r15 edx xmm0 xmm1 xmm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        movaps    %xmm2, %xmm0
+        addq      $88, %rsp
+        cfi_def_cfa_offset(8)
+        ret
+        cfi_def_cfa_offset(96)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        movups    %xmm0, 32(%rsp)
+        movups    %xmm1, 48(%rsp)
+        movups    %xmm2, 64(%rsp)
+                                # LOE rbx rbp r12 r13 r14 r15 edx
+
+        xorl      %eax, %eax
+        movq      %r12, 16(%rsp)
+        cfi_offset(12, -80)
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        cfi_offset(13, -88)
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        cfi_offset(14, -96)
+                                # LOE rbx rbp r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx rbp r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $4, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx rbp r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        movups    64(%rsp), %xmm2
+
+/* Go to exit */
+        jmp       L(EXIT)
+        cfi_offset(12, -80)
+        cfi_offset(13, -88)
+        cfi_offset(14, -96)
+                                # LOE rbx rbp r12 r13 r14 r15 xmm2
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movss     32(%rsp,%r14,4), %xmm0
+        movss     48(%rsp,%r14,4), %xmm1
+        call      hypotf@PLT
+                                # LOE rbx rbp r14 r15 r12d r13d xmm0
+
+        movss     %xmm0, 64(%rsp,%r14,4)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx rbp r15 r12d r13d
+END(_ZGVbN4vv_hypotf_sse4)
+
+        .section .rodata, "a"
+        .align 16
+
+#ifdef __svml_shypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(16)) VUINT32 _sHiLoMask[4][1];
+        __declspec(align(16)) VUINT32 _sAbsMask[4][1];
+        __declspec(align(16)) VUINT32 _sHalf[4][1];
+        __declspec(align(16)) VUINT32 _LowBoundary[4][1];
+        __declspec(align(16)) VUINT32 _HighBoundary[4][1];
+} __svml_shypot_data_internal;
+#endif
+__svml_shypot_data_internal:
+        /* legacy algorithm */
+        .long 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000  /* _sHiLoMask     */
+        .align 16
+        .long 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff  /* _sAbsMask      */
+        .align 16
+        .long 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000  /* _sHalf         */
+        .align 16
+        .long 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000  /* _LowBoundary   */
+        .align 16
+        .long 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000  /* _HighBoundary  */
+        .align 16
+        .type	__svml_shypot_data_internal,@object
+        .size	__svml_shypot_data_internal,.-__svml_shypot_data_internal
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core-sse.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core-sse.S
new file mode 100644
index 0000000000..d37556e331
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core-sse.S
@@ -0,0 +1,20 @@
+/* SSE version of vectorized hypotf.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define _ZGVdN8vv_hypotf _ZGVdN8vv_hypotf_sse_wrapper
+#include "../svml_s_hypotf8_core.S"
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core.c b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core.c
new file mode 100644
index 0000000000..6cc497e73d
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core.c
@@ -0,0 +1,28 @@
+/* Multiple versions of vectorized sinf, vector length is 8.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define SYMBOL_NAME _ZGVdN8vv_hypotf
+#include "ifunc-mathvec-avx2.h"
+
+libc_ifunc_redirected (REDIRECT_NAME, SYMBOL_NAME, IFUNC_SELECTOR ());
+
+#ifdef SHARED
+__hidden_ver1 (_ZGVdN8vv_hypotf, __GI__ZGVdN8vv_hypotf,
+	       __redirect__ZGVdN8vv_hypotf)
+  __attribute__ ((visibility ("hidden")));
+#endif
diff --git a/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core_avx2.S b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core_avx2.S
new file mode 100644
index 0000000000..733022ff01
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/svml_s_hypotf8_core_avx2.S
@@ -0,0 +1,269 @@
+/* Function hypotf vectorized with AVX2.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   https://www.gnu.org/licenses/.  */
+
+/*
+ * ALGORITHM DESCRIPTION:
+ *
+ *      HIGH LEVEL OVERVIEW
+ *
+ *      Calculate z = (x*x+y*y)
+ *      Calculate reciplicle sqrt (z)
+ *      Calculate make two NR iterations
+ *
+ *      ALGORITHM DETAILS
+ *
+ *    Multiprecision branch for _HA_ only
+ *      Remove sigm from both arguments
+ *      Find maximum (_x) and minimum (_y) (by abs value) between arguments
+ *      Split _x int _a and _b for multiprecision
+ *      If _x >> _y we will we will not split _y for multiprecision
+ *      all _y will be put into lower part (_d) and higher part (_c = 0)
+ *      Fixing _hilo_mask for the case _x >> _y
+ *      Split _y into _c and _d for multiprecision with fixed mask
+ *
+ *      compute Hi and Lo parts of _z = _x*_x + _y*_y
+ *
+ *      _zHi = _a*_a + _c*_c
+ *      _zLo = (_x + _a)*_b + _d*_y + _d*_c
+ *      _z = _zHi + _zLo
+ *
+ *    No multiprecision branch for _LA_ and _EP_
+ *      _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ *
+ *    Check _z exponent to be withing borders [1E3 ; 60A] else goto Callout
+ *
+ *    Compute resciplicle sqrt s0 ~ 1.0/sqrt(_z),
+ *      that multiplied by _z, is final result for _EP_ version.
+ *
+ *    First iteration (or zero iteration):
+ *       s =  z * s0
+ *       h = .5 * s0
+ *       d =  s *  h - .5
+ *
+ *    Second iteration:
+ *       h = d * h + h
+ *       s = s * d + s
+ *       d = s * s - z (in multiprecision for _HA_)
+ *
+ *    result = s - h * d
+ *
+ *    EP version of the function can be implemented as y[i]=sqrt(a[i]^2+b[i]^2)
+ *    with all intermediate operations done in target precision for i=1,..,n.
+ *    It can return result y[i]=0 in case a[i]^2 and b[i]^2 underflow in target
+ *    precision (for some i). It can return result y[i]=NAN in case
+ *    a[i]^2+b[i]^2 overflow in target precision, for some i. It can return
+ *    result y[i]=NAN in case a[i] or b[i] is infinite, for some i.
+ *
+ *
+ */
+
+/* Offsets for data table __svml_shypot_data_internal
+ */
+#define _sHiLoMask                    	0
+#define _sAbsMask                     	32
+#define _sHalf                        	64
+#define _LowBoundary                  	96
+#define _HighBoundary                 	128
+
+#include <sysdep.h>
+
+        .text
+	.section .text.avx2,"ax",@progbits
+ENTRY(_ZGVdN8vv_hypotf_avx2)
+        pushq     %rbp
+        cfi_def_cfa_offset(16)
+        movq      %rsp, %rbp
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+        andq      $-32, %rsp
+        subq      $128, %rsp
+
+/*
+ *  Implementation
+ * Multiprecision branch for _HA_ only
+ * No multiprecision branch for _LA_
+ * _z = _VARG1 * _VARG1 + _VARG2 * _VARG2
+ */
+        vmulps    %ymm0, %ymm0, %ymm8
+
+/*
+ *  Variables
+ *  Defines
+ *  Constants loading
+ */
+        vmovups   _sHalf+__svml_shypot_data_internal(%rip), %ymm7
+
+/* Check _z exponent to be withing borders [1E3 ; 60A] else goto Callout */
+        vmovups   _LowBoundary+__svml_shypot_data_internal(%rip), %ymm2
+        vfmadd231ps %ymm1, %ymm1, %ymm8
+
+/* _s0  ~ 1.0/sqrt(_z) */
+        vrsqrtps  %ymm8, %ymm6
+        vpcmpgtd  %ymm8, %ymm2, %ymm3
+
+/* First iteration */
+        vmulps    %ymm8, %ymm6, %ymm9
+        vmulps    %ymm7, %ymm6, %ymm2
+        vfnmadd231ps %ymm9, %ymm2, %ymm7
+        vfmadd213ps %ymm9, %ymm7, %ymm9
+
+/* Second iteration */
+        vfmadd132ps %ymm7, %ymm2, %ymm2
+        vpcmpgtd  _HighBoundary+__svml_shypot_data_internal(%rip), %ymm8, %ymm4
+        vpor      %ymm4, %ymm3, %ymm5
+
+/* Finish second iteration in native precision for _LA_ */
+        vfmsub231ps %ymm9, %ymm9, %ymm8
+        vmovmskps %ymm5, %edx
+        vfnmadd213ps %ymm9, %ymm8, %ymm2
+
+/*  The end of implementation  */
+        testl     %edx, %edx
+
+/* Go to special inputs processing branch */
+        jne       L(SPECIAL_VALUES_BRANCH)
+                                # LOE rbx r12 r13 r14 r15 edx ymm0 ymm1 ymm2
+
+/* Restore registers
+ * and exit the function
+ */
+
+L(EXIT):
+        vmovaps   %ymm2, %ymm0
+        movq      %rbp, %rsp
+        popq      %rbp
+        cfi_def_cfa(7, 8)
+        cfi_restore(6)
+        ret
+        cfi_def_cfa(6, 16)
+        cfi_offset(6, -16)
+
+/* Branch to process
+ * special inputs
+ */
+
+L(SPECIAL_VALUES_BRANCH):
+        vmovups   %ymm0, 32(%rsp)
+        vmovups   %ymm1, 64(%rsp)
+        vmovups   %ymm2, 96(%rsp)
+                                # LOE rbx r12 r13 r14 r15 edx ymm2
+
+        xorl      %eax, %eax
+                                # LOE rbx r12 r13 r14 r15 eax edx
+
+        vzeroupper
+        movq      %r12, 16(%rsp)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -112; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x90, 0xff, 0xff, 0xff, 0x22
+        movl      %eax, %r12d
+        movq      %r13, 8(%rsp)
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -120; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x88, 0xff, 0xff, 0xff, 0x22
+        movl      %edx, %r13d
+        movq      %r14, (%rsp)
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -128; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x80, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r15 r12d r13d
+
+/* Range mask
+ * bits check
+ */
+
+L(RANGEMASK_CHECK):
+        btl       %r12d, %r13d
+
+/* Call scalar math function */
+        jc        L(SCALAR_MATH_CALL)
+                                # LOE rbx r15 r12d r13d
+
+/* Special inputs
+ * processing loop
+ */
+
+L(SPECIAL_VALUES_LOOP):
+        incl      %r12d
+        cmpl      $8, %r12d
+
+/* Check bits in range mask */
+        jl        L(RANGEMASK_CHECK)
+                                # LOE rbx r15 r12d r13d
+
+        movq      16(%rsp), %r12
+        cfi_restore(12)
+        movq      8(%rsp), %r13
+        cfi_restore(13)
+        movq      (%rsp), %r14
+        cfi_restore(14)
+        vmovups   96(%rsp), %ymm2
+
+/* Go to exit */
+        jmp       L(EXIT)
+        /*  DW_CFA_expression: r12 (r12) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -112; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0c, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x90, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r13 (r13) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -120; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0d, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x88, 0xff, 0xff, 0xff, 0x22
+        /*  DW_CFA_expression: r14 (r14) (DW_OP_lit8; DW_OP_minus; DW_OP_const4s: -32; DW_OP_and; DW_OP_const4s: -128; DW_OP_plus)  */
+        .cfi_escape 0x10, 0x0e, 0x0e, 0x38, 0x1c, 0x0d, 0xe0, 0xff, 0xff, 0xff, 0x1a, 0x0d, 0x80, 0xff, 0xff, 0xff, 0x22
+                                # LOE rbx r12 r13 r14 r15 ymm2
+
+/* Scalar math fucntion call
+ * to process special input
+ */
+
+L(SCALAR_MATH_CALL):
+        movl      %r12d, %r14d
+        movss     32(%rsp,%r14,4), %xmm0
+        movss     64(%rsp,%r14,4), %xmm1
+        call      hypotf@PLT
+                                # LOE rbx r14 r15 r12d r13d xmm0
+
+        movss     %xmm0, 96(%rsp,%r14,4)
+
+/* Process special inputs in loop */
+        jmp       L(SPECIAL_VALUES_LOOP)
+                                # LOE rbx r15 r12d r13d
+END(_ZGVdN8vv_hypotf_avx2)
+
+        .section .rodata, "a"
+        .align 32
+
+#ifdef __svml_shypot_data_internal_typedef
+typedef unsigned int VUINT32;
+typedef struct
+{
+        __declspec(align(32)) VUINT32 _sHiLoMask[8][1];
+        __declspec(align(32)) VUINT32 _sAbsMask[8][1];
+        __declspec(align(32)) VUINT32 _sHalf[8][1];
+        __declspec(align(32)) VUINT32 _LowBoundary[8][1];
+        __declspec(align(32)) VUINT32 _HighBoundary[8][1];
+} __svml_shypot_data_internal;
+#endif
+__svml_shypot_data_internal:
+        /* legacy algorithm */
+        .long 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000, 0xFFF80000  /* _sHiLoMask     */
+        .align 32
+        .long 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff  /* _sAbsMask      */
+        .align 32
+        .long 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000  /* _sHalf         */
+        .align 32
+        .long 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000, 0x1E300000  /* _LowBoundary   */
+        .align 32
+        .long 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000, 0x60A00000  /* _HighBoundary  */
+        .align 32
+        .type	__svml_shypot_data_internal,@object
+        .size	__svml_shypot_data_internal,.-__svml_shypot_data_internal