RFR: 8338023: Support two vector selectFrom API [v13]

Jatin Bhateja jbhateja at openjdk.org
Thu Oct 3 05:09:22 UTC 2024


On Tue, 1 Oct 2024 18:03:06 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>>> This could instead be: src1.rearrange(this.lanewise(VectorOperators.AND, 2 * VLENGTH - 1).toShuffle(), src2); Or even simplified to: src1.rearrange(this.toShuffle(), src2);
>> 
>> Yes, this may save additional allocation penalty of result array allocation which may slightly improve fall back performance, but logical operation cannot be directly applied over floating point vectors. so, we will need an explicit conversion to integral vector, which is why I opted for current fallback implementation which is in line with rest of the code.
>
> I see the problem with float/double vectors. Let us do the rearrange form only for Integral (byte, short, int, long) vectors then. For float/double vector we could keep the code that you have currently.

You will also need additional handling for NPOT vector sizes which is handled by existing fallback implementation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20508#discussion_r1785634658


More information about the hotspot-compiler-dev mailing list