This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 03/28] powerpc: Remove power4 mpa optimization

On 24/04/2019 18:51, Gabriel F. T. Gomes wrote:
> On Fri, Mar 29 2019, Adhemerval Zanella wrote:
>> This patch removes the POWER4 optimized mpa optimization used for power4+
>> build.  For newer chips, GCC generates *worse* code than generic
>> implementation as benchmaks result below.
> I don't think I have access to POWER4 hardware, but when running
> power4-targeted builds on newer processors, I saw no performance
> degradation even in that scenario.

My guess is the optimization was trying to overcome some compiler
missed optimization (POWER4 was released at same time as GCC 3.2.3
and mostly likely distributions were using even older releases to
build system libc).

>> One possibilty would to add
>> IFUNC variants for the mpa routines (as x86_64), but it will add complexity
>> only for older chips (and one would need to check if power5, power5+, and
>> power6 do benefict from this optimization), and only for specific
>> implementation (since most used ones such as sin, cos, exp, pow already
>> avoid calling the slow multiprecision path).
> I don't think it's worth the effort.


>> Checked on powerpc-linux-gnu (built without --with-cpu, with
>> --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
>> powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
>> and --disable-multi-arch).
> Thanks for the thorough checking.
>> 	* sysdeps/powerpc/power4/fpu/Makefile: Remove file.
>> 	* sysdeps/powerpc/power4/fpu/mpa-arch.h: Likewise.
>> 	* sysdeps/powerpc/power4/fpu/mpa.c: Likewise.
> Looks good to me.
> Reviewed-by: Gabriel F. T. Gomes <>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]