[16] RFR(S): 8251525: AARCH64: Faster Math.signum(fp)
Dmitry Chuyko
dmitry.chuyko at bell-sw.com
Thu Aug 13 11:04:37 UTC 2020
Hello,
Please review a faster version of Math.signum() for AArch64.
Two new intrinsics (double and float) are introduced in general code,
with appropriate new nodes. New JTreg test is added to cover the
intrinsic case (enabled only for aarch64).
AArch64 implementation uses FACGT (compare abslute fp values) and BSL
(fp bit selection) to avoid branches and moves to non-fp registers and back.
Performance results show ~30% better time in the benchmark with a black
hole [1] on Cortex. E.g. on random numbers 4.8 ns/op --> 3.5 ns/op,
overhead is 2.9 ns/op.
rfe: https://bugs.openjdk.java.net/browse/JDK-8251525
webrev: http://cr.openjdk.java.net/~dchuyko/8251525/webrev.00/
testing: jck, jtreg including new dedicated test
-Dmitry
[1] https://cr.openjdk.java.net/~dchuyko/8249198/DoubleSignum.java
More information about the hotspot-compiler-dev
mailing list