powerpc: Remove optimized isinf

System Internals / glibc - Adhemerval Zanella [linaro.org] - 12 June 2019 17:32 EDT

The powerpc isinf optimizations onyl adds complexity:

- GCC will call libm iff -fsignaling-nans is used. This usage pattern is usually not performance oriented and for such calls PLT overhead should dominate execution time.

- The power7 uses ftdiv to optimize for some input pattern and branch implementation for INF and denormal that does:

return (ix & UINT64_C (0x7fffffffffffffff)) == UINT64_C (0x7ff0000000000000)

Although it does show slight better latency than generic algorithm (as below), it is only for power7 and requires it to override it for power8.

- The power8 implementation is just the generic implementation using ISA 2.07 mfvsrd instruction (which GCC uses for generic implementation). So generic implementation is the best option for powerpc64le.

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).

- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (sysdeps_routines, libm-sysdep_routines): Remove s_isinf* and s_isinf* objects.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S: Remove file.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c: Likewise.
- sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c: Likewise.
- sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
- sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile (sysdep_call): Remove s_isinf* and s_isinf* objects.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c: Likewise.
- sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c: Likewise.
- sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise.
- sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S: Likewise.
- sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise.
- sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S: Likewise.

6427a6ac8c powerpc: Remove optimized isinf
ChangeLog | 26 +++++++
.../powerpc32/power4/fpu/multiarch/Makefile | 6 +-
.../power4/fpu/multiarch/s_isinf-power7.S | 33 ---------
.../powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c | 33 ---------
.../powerpc32/power4/fpu/multiarch/s_isinf.c | 50 -------------
.../power4/fpu/multiarch/s_isinff-ppc32.c | 31 --------
.../powerpc32/power4/fpu/multiarch/s_isinff.c | 35 ---------
sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S | 85 ----------------------
sysdeps/powerpc/powerpc32/power7/fpu/s_isinff.S | 1 -
sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile | 2 -
.../powerpc64/fpu/multiarch/s_isinf-power7.S | 32 --------
.../powerpc64/fpu/multiarch/s_isinf-power8.S | 32 --------
.../powerpc64/fpu/multiarch/s_isinf-ppc64.c | 33 ---------
sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c | 62 ----------------
.../powerpc64/fpu/multiarch/s_isinff-ppc64.c | 31 --------
sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c | 38 ----------
sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S | 69 ------------------
sysdeps/powerpc/powerpc64/power7/fpu/s_isinff.S | 1 -
sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S | 61 ----------------
sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S | 1 -
20 files changed, 28 insertions(+), 634 deletions(-)

Upstream: sourceware.org


  • Share