RFR: 8303553: AArch64: Add BCAX backend rule
changpeng1997
duke at openjdk.org
Thu Mar 30 08:51:30 UTC 2023
On Wed, 29 Mar 2023 11:06:38 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > This computing pattern (a ^ (b & (~c))) can be found in some SHA-3 java implementation, like https://github.com/aelstad/keccakj/blob/07185d29fb6c881570e2d7fd2b160460626dc130/src/main/java/com/github/aelstad/keccakj/core/Keccak1600.java#L309.
> > I believe this patch can accelerate some SHA-3 applications implemented by Java.
>
> OK, thanks. Please benchmark this and let us know the result. It'd also be interesting to know how it compares with our SHA-3 intrinsic.
@theRealAph I have run the SHA-3 benchmark [1] [2] and I found BCAX instruction cannot be generated since SLP failed to vectorize these code. I tend to agree with you.
In addition, SHA-3 intrinsic has been removed so we cannot compare with it.
[1]: https://github.com/openjdk/jdk/blob/master/test/micro/org/openjdk/bench/java/security/MessageDigests.java
[2]: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/sun/security/provider/SHA3.java
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13222#issuecomment-1489930583
More information about the hotspot-compiler-dev
mailing list