RFR: 8350483: AArch64: turn on signum intrinsics by default on Ampere CPUs

Patrick Zhang qpzhang at openjdk.org
Tue Feb 25 05:00:50 UTC 2025


On Mon, 24 Feb 2025 12:52:14 GMT, Andrew Haley <aph at openjdk.org> wrote:

> > Maybe we should think about removing the `UseSignumIntrinsic` flag altogether.
> 
> Ah, the flag is also used by other ports. But it doesn't make much sense for us not to use the intrinsic.

Thanks for your review @theRealAph. 

Yes, agree with you that we should turn on signum intrinsics (`-XX:+UseSignumIntrinsic`), probably `-XX:+UseCopySignIntrinsic` too. I had a larger test set on Neoverse-N1 and Ampere CPUs, and compared w/ vs w/o these two flags respectively, no obvious performance regression so far. `-XX:+UseSignumIntrinsic` can produce obvious benefits on `fmov` cases, while `-XX:+UseCopySignIntrinsic` can also bring +15% improvements to `*MathBench.signum*` tests when disabling the signum intrinsics. In Math.java, signum calls copySign, as such the benefit of copysign intrinsics would be hidden in a manner. Therefore, I think they two could be turned on altogether. A JBS ticket is required to track so.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23735#issuecomment-2680514896


More information about the hotspot-dev mailing list