RFR: 8310691: [REDO] [vectorapi] Refactor VectorShuffle implementation [v8]
Quan Anh Mai
qamai at openjdk.org
Tue Dec 10 08:16:20 UTC 2024
On Tue, 10 Dec 2024 07:54:55 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Byte128Vector.java line 822:
>>
>>> 820: static final Class<Byte> ETYPE = byte.class; // used by the JVM
>>> 821:
>>> 822: Byte128Shuffle(byte[] indices) {
>>
>> We still cannot accommodate all the indexes for the 2048 bit scalable vector for ARM SVE. Max index accommodable is 127 since byte is a signed type with value range b/w [-128 , 127].
>
> This is a limitation and not a blocker for this re-factor.
A byte is just a bunch of bits, the signness of the value depends on how it is used. As a result, I believe there is nothing preventing us from treating this index as unsigned for 2048-bit SVE (with some modifications such as the Java implementation being `int ei = Integer.remainderUnsigned(Byte.toUnsignedInt(s_.laneSource(i)), v1.length())`).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21042#discussion_r1877545203
More information about the hotspot-compiler-dev
mailing list