diff options
author | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2017-04-18 11:28:56 +0530 |
---|---|---|
committer | Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com> | 2017-04-18 11:28:56 +0530 |
commit | 6c6ab1fc49d524ab1892cb20ee74352ace0b8034 (patch) | |
tree | 716e71e31d63e0b534e2ff47fe6bb8f192f81d76 /sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | |
parent | 2604882cefd3281679b8177245fdebc7061b8695 (diff) | |
download | glibc-6c6ab1fc49d524ab1892cb20ee74352ace0b8034.tar.gz glibc-6c6ab1fc49d524ab1892cb20ee74352ace0b8034.tar.xz glibc-6c6ab1fc49d524ab1892cb20ee74352ace0b8034.zip |
powerpc64: strrchr optimization for power8
P7 code is used for <=32B strings and for > 32B vectorized loops are used. This shows as an average 25% improvement depending on the position of search character. The performance is same for shorter strings. Tested on ppc64 and ppc64le.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c')
-rw-r--r-- | sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c index bddec1a6f8..107ffe6416 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c @@ -284,6 +284,9 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Support sysdeps/powerpc/powerpc64/multiarch/strrchr.c. */ IFUNC_IMPL (i, name, strrchr, IFUNC_IMPL_ADD (array, i, strrchr, + hwcap2 & PPC_FEATURE2_ARCH_2_07, + __strrchr_power8) + IFUNC_IMPL_ADD (array, i, strrchr, hwcap & PPC_FEATURE_HAS_VSX, __strrchr_power7) IFUNC_IMPL_ADD (array, i, strrchr, 1, |