RFR: 8322770: Implement C2 VectorizedHashCode on AArch64 [v17]
Mikhail Ablakatov
duke at openjdk.org
Fri Sep 27 10:40:41 UTC 2024
On Thu, 26 Sep 2024 12:32:08 GMT, Mikhail Ablakatov <duke at openjdk.org> wrote:
>> Mikhail Ablakatov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> cleanup: add a description for intpow()
>>
>> Co-authored-by: Andrew Haley <aph-open at littlepinkcloud.com>
>
> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5445:
>
>> 5443: __ uxtl(vhalf0, Assembler::T4S, vdata0, Assembler::T4H);
>> 5444: }
>> 5445: __ addv(vmul0, Assembler::T4S, vmul0, vhalf0);
>
> I was advised to use a single `SADDW`/`UADDW` instruction instead of the current pair of `SXTL`/`UXTL` followed by `ADD`. It seems this was likely overlooked because the `Assembler` class is missing the corresponding instructions. I am adding these instructions and updating the implementation accordingly.
Done by https://github.com/openjdk/jdk/pull/18487/commits/03849d62254d3bbf23b01659d8fd4a27fa1c019e .
This improves the performance for `T_BOOLEAN`/`T_BYTE` and `T_CHAR`/`T_SHORT` arrays compared to the previous implementation (https://github.com/openjdk/jdk/pull/18487/commits/bfa93695b7813678936d4d25ed02866353eaae81).


[ArraysHashCode-v2-03849d6.txt](https://github.com/user-attachments/files/17162865/ArraysHashCode-v2-03849d6.txt)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18487#discussion_r1778415094
More information about the hotspot-dev
mailing list