glibc/sysdeps/powerpc/powerpc64/le
Pedro Franco de Carvalho 813c6ec808 powerpc: optimize strcpy/stpcpy for POWER9/10
This patch modifies the current POWER9 implementation of strcpy and
stpcpy to optimize it for POWER9/10.

Since no new POWER10 instructions are used, the original POWER9 strcpy is
modified instead of creating a new implementation for POWER10.  This
implementation is based on both the original POWER9 implementation of
strcpy and the preamble of the new POWER10 implementation of strlen.

The changes also affect stpcpy, which uses the same implementation with
some additional code before returning.

On POWER9, averaging improvements across the benchmark
inputs (length/source alignment/destination alignment), for an
experiment that ran the benchmark five times, bench-strcpy showed an
improvement of 5.23%, and bench-stpcpy showed an improvement of 6.59%.

On POWER10, bench-strcpy showed 13.16%, and bench-stpcpy showed 13.59%.

The changes are:

1. Removed the null string optimization.

   Although this results in a few extra cycles for the null string, in
   combination with the second change, this resulted in improvements for
   for other cases.

2. Adapted the preamble from strlen for POWER10.

   This is the part of the function that handles up to the first 16 bytes
   of the string.

3. Increased number of unrolled iterations in the main loop to 6.

Reviewed-by: Matheus Castanho <msc@linux.ibm.com>
Tested-by: Matheus Castanho <msc@linux.ibm.com>
2021-07-01 17:58:53 -03:00
..
fpu powerpc: Add log IFUNC multiarch support for POWER10 2021-04-26 10:10:29 -03:00
multiarch
power7
power8
power9 powerpc: optimize strcpy/stpcpy for POWER9/10 2021-07-01 17:58:53 -03:00
power10 powerpc: Optimized memcmp for power10 2021-05-31 18:00:20 -03:00
configure powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0) 2020-04-30 08:52:08 -05:00
configure.ac powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0) 2020-04-30 08:52:08 -05:00
dl-hwcap-check.h powerpc64le: Check HWCAP bits against compiler build flags 2021-05-19 11:09:57 +02:00
dl-hwcaps-subdirs.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Implies
Implies-before powerpc64le: Enable support for IEEE long double 2020-04-30 08:52:08 -05:00
Makefile powerpc64le: Add glibc-hwcaps support 2020-12-04 14:50:49 +01:00
no_ldbl_gnu_attribute.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-glibc-hwcaps.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00