RFR: 8338023: Support two vector selectFrom API [v10]
Emanuel Peter
epeter at openjdk.org
Wed Sep 18 12:18:12 UTC 2024
On Tue, 17 Sep 2024 07:02:20 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2122:
>>
>>> 2120: // index format by subsequent VectorLoadShuffle.
>>> 2121: int cast_vopc = VectorCastNode::opcode(0, index_elem_bt, true);
>>> 2122: Node* index_byte_vec = phase->transform(VectorCastNode::make(cast_vopc, index_vec, T_BYTE, num_elem));
>>
>> This cast assumes that the indices cannot have more than 8 bits. This would allow vector lengths of up to 256. This is fine for intel. But as far as I know ARM has in principle longer vectors - up to 2048 bytes. Should we maybe add some assert here to make sure we never badly truncate the index?
>
> Shuffle overhaul is on our todo list, its a know limitation which we tried lifting once, yes you read it correctly, its a limitation for AARCH64 SVE once a 2048 bits vector systems are available, IIRC current max vector size on any available AARCH64 system is 256 bits, with Neoverse V2 they shrink the vector size back to 16 bytes.
Are there any asserts that would catch this?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20508#discussion_r1764943566
More information about the hotspot-compiler-dev
mailing list