|
|
190885 |
From 29dfcb178f889d1bd91e9eb9d98d7e74fddcde51 Mon Sep 17 00:00:00 2001
|
|
|
190885 |
From: Noah Goldstein <goldstein.w.n@gmail.com>
|
|
|
190885 |
Date: Sun, 23 May 2021 19:43:24 -0400
|
|
|
190885 |
Subject: [PATCH] x86: Improve memmove-vec-unaligned-erms.S
|
|
|
190885 |
|
|
|
190885 |
This patch changes the condition for copy 4x VEC so that if length is
|
|
|
190885 |
exactly equal to 4 * VEC_SIZE it will use the 4x VEC case instead of
|
|
|
190885 |
8x VEC case.
|
|
|
190885 |
|
|
|
190885 |
Results For Skylake memcpy-avx2-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 0 , 9.137 , 6.873 , New , 75.22
|
|
|
190885 |
128 , 7 , 0 , 12.933 , 7.732 , New , 59.79
|
|
|
190885 |
128 , 0 , 7 , 11.852 , 6.76 , New , 57.04
|
|
|
190885 |
128 , 7 , 7 , 12.587 , 6.808 , New , 54.09
|
|
|
190885 |
|
|
|
190885 |
Results For Icelake memcpy-evex-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 0 , 9.963 , 5.416 , New , 54.36
|
|
|
190885 |
128 , 7 , 0 , 16.467 , 8.061 , New , 48.95
|
|
|
190885 |
128 , 0 , 7 , 14.388 , 7.644 , New , 53.13
|
|
|
190885 |
128 , 7 , 7 , 14.546 , 7.642 , New , 52.54
|
|
|
190885 |
|
|
|
190885 |
Results For Tigerlake memcpy-evex-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 0 , 8.979 , 4.95 , New , 55.13
|
|
|
190885 |
128 , 7 , 0 , 14.245 , 7.122 , New , 50.0
|
|
|
190885 |
128 , 0 , 7 , 12.668 , 6.675 , New , 52.69
|
|
|
190885 |
128 , 7 , 7 , 13.042 , 6.802 , New , 52.15
|
|
|
190885 |
|
|
|
190885 |
Results For Skylake memmove-avx2-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 32 , 6.181 , 5.691 , New , 92.07
|
|
|
190885 |
128 , 32 , 0 , 6.165 , 5.752 , New , 93.3
|
|
|
190885 |
128 , 0 , 7 , 13.923 , 9.37 , New , 67.3
|
|
|
190885 |
128 , 7 , 0 , 12.049 , 10.182 , New , 84.5
|
|
|
190885 |
|
|
|
190885 |
Results For Icelake memmove-evex-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 32 , 5.479 , 4.889 , New , 89.23
|
|
|
190885 |
128 , 32 , 0 , 5.127 , 4.911 , New , 95.79
|
|
|
190885 |
128 , 0 , 7 , 18.885 , 13.547 , New , 71.73
|
|
|
190885 |
128 , 7 , 0 , 15.565 , 14.436 , New , 92.75
|
|
|
190885 |
|
|
|
190885 |
Results For Tigerlake memmove-evex-erms
|
|
|
190885 |
size, al1 , al2 , Cur T , New T , Win , New / Cur
|
|
|
190885 |
128 , 0 , 32 , 5.275 , 4.815 , New , 91.28
|
|
|
190885 |
128 , 32 , 0 , 5.376 , 4.565 , New , 84.91
|
|
|
190885 |
128 , 0 , 7 , 19.426 , 14.273 , New , 73.47
|
|
|
190885 |
128 , 7 , 0 , 15.924 , 14.951 , New , 93.89
|
|
|
190885 |
|
|
|
190885 |
Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
|
|
|
190885 |
(cherry picked from commit 1b992204f68af851e905c16016756fd4421e1934)
|
|
|
190885 |
---
|
|
|
190885 |
sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S | 6 +++---
|
|
|
190885 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
190885 |
|
|
|
190885 |
diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
|
|
|
190885 |
index 3e2dd6bc..572cef04 100644
|
|
|
190885 |
--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
|
|
|
190885 |
+++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S
|
|
|
190885 |
@@ -417,8 +417,8 @@ L(more_2x_vec):
|
|
|
190885 |
cmpq $(VEC_SIZE * 8), %rdx
|
|
|
190885 |
ja L(more_8x_vec)
|
|
|
190885 |
cmpq $(VEC_SIZE * 4), %rdx
|
|
|
190885 |
- jb L(last_4x_vec)
|
|
|
190885 |
- /* Copy from 4 * VEC to 8 * VEC, inclusively. */
|
|
|
190885 |
+ jbe L(last_4x_vec)
|
|
|
190885 |
+ /* Copy from 4 * VEC + 1 to 8 * VEC, inclusively. */
|
|
|
190885 |
VMOVU (%rsi), %VEC(0)
|
|
|
190885 |
VMOVU VEC_SIZE(%rsi), %VEC(1)
|
|
|
190885 |
VMOVU (VEC_SIZE * 2)(%rsi), %VEC(2)
|
|
|
190885 |
@@ -437,7 +437,7 @@ L(more_2x_vec):
|
|
|
190885 |
VMOVU %VEC(7), -(VEC_SIZE * 4)(%rdi,%rdx)
|
|
|
190885 |
VZEROUPPER_RETURN
|
|
|
190885 |
L(last_4x_vec):
|
|
|
190885 |
- /* Copy from 2 * VEC to 4 * VEC. */
|
|
|
190885 |
+ /* Copy from 2 * VEC + 1 to 4 * VEC, inclusively. */
|
|
|
190885 |
VMOVU (%rsi), %VEC(0)
|
|
|
190885 |
VMOVU VEC_SIZE(%rsi), %VEC(1)
|
|
|
190885 |
VMOVU -VEC_SIZE(%rsi,%rdx), %VEC(2)
|
|
|
190885 |
--
|
|
|
190885 |
GitLab
|
|
|
190885 |
|