On Tue, 19 May 2026 19:51:01 GMT, Volodymyr Paprotski <[email protected]>
wrote:
>> src/hotspot/cpu/x86/stubGenerator_x86_64_sha3.cpp line 248:
>>
>>> 246: } else {
>>> 247: __ vmovdqu(X1, Address(state1, disp), Assembler::AVX_128bit);
>>> 248: __ vshufpd(X2, X1, X2, 0b01, Assembler::AVX_128bit);
>>
>> When called for stubgen_sha3* the control reaches here. Nothing seems to be
>> loaded into X2 prior but it is used in vshufpd?
>
> That is correct.. but you are right, very misleading. for the non-parallel
> keccak, (for AVX512 version) we only care about the first column, so the `1`
> in `0b01` doesnt matter ('dont care' bit.. but no X here..). I think a
> comment is appropriate here..
It would be better to write this as:
__ vshufpd(X2, X1, X1, 0b01, Assembler::AVX_128bit);
to avoid false dependency on uninitialized X2.
A comment would be very helpful. I think you are trying to load state[1] into
X2 lower element so the 1 does matter.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31125#discussion_r3269501264