RFR: 8353500: [s390x] Intrinsify Unsafe::setMemory [v5]
Amit Kumar
amitkumar at openjdk.org
Mon May 26 09:32:48 UTC 2025
On Mon, 26 May 2025 07:36:14 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:
>> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> switch to vector stores
>
> src/hotspot/cpu/s390/stubGenerator_s390.cpp line 1499:
>
>> 1497:
>> 1498: __ z_vlvgb(Z_V0, byteVal, 0);
>> 1499: __ z_vrepb(Z_V0, Z_V0, 0);
>
> You could also use `z_vzero(Vreg)` to preload the vector register with all zeroes. Saves an instruction.
I am not loading 0 here. This is my intention: with `z_vlvgb`, putting value of `byteVal` in the first 0th index of `Z_V0` and then with `z_vrepb` replicating the `0th` index value (1 byte) to the whole register.
`z_vzero` will make sense if we are zeroing out the memory but that's not the case always. We do fill some non-zero 1 byte value in most of the case.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24480#discussion_r2106913366
More information about the hotspot-compiler-dev
mailing list