RFR: 8349721: Add aarch64 intrinsics for ML-KEM [v7]

Andrew Dinn adinn at openjdk.org
Thu Apr 10 14:19:46 UTC 2025


On Thu, 10 Apr 2025 13:19:05 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> By using the aarch64 vector registers the speed of the computation of the ML-KEM algorithms (key generation, encapsulation, decapsulation) can be approximately doubled.
>
> Ferenc Rakoczi has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Code rearrange, some renaming, fixing comments
>  - Changes suggested by Andrew Dinn.

src/hotspot/cpu/aarch64/register_aarch64.hpp line 510:

> 508: 
> 509: // convenience methods for splitting 8-way of 4-way vector register
> 510: // sequences in half -- needed because vector operations can normally

typo: 8-way of 4-way -> 8-way or 4-way

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5012:

> 5010:     assert(!va.is_constant(), "output vector must identify 2 different registers");
> 5011: 
> 5012:     // schedule 2 streams of i<nstructions across the vector sequences

typo: i<nstructions -> instructions

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5167:

> 5165:     // On each level, we fill up the vector registers in such a way that the
> 5166:     // array elements that need to be multiplied by the zetas be in one
> 5167:     // set of vector registers while the corresponding ones that don't need to

grammar: by the zetas be in one ... -> by the zetas are in one ...

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5168:

> 5166:     // array elements that need to be multiplied by the zetas be in one
> 5167:     // set of vector registers while the corresponding ones that don't need to
> 5168:     // be multiplied, in another set. We can do 32 Montgomery multiplications

grammar: be multiplied, in another set. --> be multiplied are in another set.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23663#discussion_r2037529145
PR Review Comment: https://git.openjdk.org/jdk/pull/23663#discussion_r2037526649
PR Review Comment: https://git.openjdk.org/jdk/pull/23663#discussion_r2037535909
PR Review Comment: https://git.openjdk.org/jdk/pull/23663#discussion_r2037537834


More information about the hotspot-dev mailing list