]> git.ipfire.org Git - thirdparty/glibc.git/commit
AArch64: Improve codegen in SVE expf & related routines
authorJoe Ramsay <Joe.Ramsay@arm.com>
Mon, 23 Sep 2024 14:26:12 +0000 (15:26 +0100)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Thu, 27 Feb 2025 17:05:45 +0000 (17:05 +0000)
commit354aeaf2130c1484007025563fe87c997f07324a
treea4ca6d4d66f1316ebfd1671fa6eb0df42a4a0e12
parenta991a0fc7c051d7ef2ea7778e0a699f22d4e53d7
AArch64: Improve codegen in SVE expf & related routines

Reduce MOV and MOVPRFX by improving special-case handling.  Use inline
helper to duplicate the entire computation between the special- and
non-special case branches, removing the contention for z0 between x
and the return value.

Also rearrange some MLAs and MLSs - by making the multiplicand the
destination we can avoid a MOVPRFX in several cases.  Also change which
constants go in the vector used for lanewise ops - the last lane is no
longer wasted.

Spotted that shift was incorrect in exp2f and exp10f, w.r.t. to the
comment that explains it.  Fixed - worst-case ULP for exp2f moves
around but it doesn't change significantly for either routine.

Worst-case error for coshf increases due to passing x to exp rather
than abs(x) - updated the comment, but does not require regen-ulps.

Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
(cherry picked from commit 7b8c134b5460ed933d610fa92ed1227372b68fdc)
sysdeps/aarch64/fpu/coshf_sve.c
sysdeps/aarch64/fpu/exp10f_sve.c
sysdeps/aarch64/fpu/exp2f_sve.c
sysdeps/aarch64/fpu/expf_sve.c
sysdeps/aarch64/fpu/sv_expf_inline.h