From 9314d3545e6641063b490918e2e8716556ba20db Mon Sep 17 00:00:00 2001 From: Rajalakshmi Srinivasaraghavan Date: Tue, 27 Dec 2016 17:48:37 -0200 Subject: powerpc64: strchr/strchrnul optimization for power8 The 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. --- sysdeps/powerpc/powerpc64/multiarch/strchr.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysdeps/powerpc/powerpc64/multiarch/strchr.c') diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchr.c b/sysdeps/powerpc/powerpc64/multiarch/strchr.c index e24d6b319e..2ffb1f6c5d 100644 --- a/sysdeps/powerpc/powerpc64/multiarch/strchr.c +++ b/sysdeps/powerpc/powerpc64/multiarch/strchr.c @@ -27,11 +27,14 @@ extern __typeof (strchr) __strchr_ppc attribute_hidden; extern __typeof (strchr) __strchr_power7 attribute_hidden; +extern __typeof (strchr) __strchr_power8 attribute_hidden; # undef strchr /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ libc_ifunc_redirected (__redirect_strchr, strchr, + (hwcap2 & PPC_FEATURE2_ARCH_2_07) + ? __strchr_power8 : (hwcap & PPC_FEATURE_HAS_VSX) ? __strchr_power7 : __strchr_ppc); -- cgit v1.2.1