RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v2]

Emanuel Peter epeter at openjdk.org
Fri Jan 5 10:05:28 UTC 2024


On Fri, 5 Jan 2024 09:31:50 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64.cpp line 957:
>> 
>>> 955:   __ align(CodeEntryAlignment);
>>> 956:   StubCodeMark mark(this, "StubRoutines", stub_name);
>>> 957:   address start = __ pc();
>> 
>> Could you please add some comments here why you are filling the data like this?
>> Presumably, you are emitting 32 bits and 64 bits respectively, right? So the cells have different size, correct?
>
> Thanks for the comment addition!

Improvement suggestion:
For a vector with 8 ints, we get `2^8 = 256` many bit patterns for the mask. The table has a row for each `mask` value, consisting of 8 ints, which provide the valid permute index corresponding to set bit position in the `mask`, or a -1 (default) value.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17261#discussion_r1442668440


More information about the core-libs-dev mailing list