RFR: 8351623: VectorAPI: Add SVE implementation of subword gather load operation [v5]

Emanuel Peter epeter at openjdk.org
Tue Sep 9 07:36:52 UTC 2025


On Mon, 8 Sep 2025 03:12:18 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Did you consider the alternative of `Extract` + `Cast`? Not sure if that would be better, you know more about the code complexity. It would just allow us to have one fewer nodes.
>
> It just has the `Extract` node to extract an element from vector in C2, right? Extracting the lowest part can be implemented with `VectorReinterpret` easily. But how about the higher parts? Maybe this can also be implemented with operations like `slice` ? But, seems this will also make the IR more complex? For `Cast`, we have `VectorCastMask` now, but it assumes the vector length should be the same for input and output. So the `VectorReinterpret` or an `VectorExtract` is sill needed. 
> 
> I can have a try with separating the IR. But I guess an additional new node is still necessary. 
> 
>> It would just allow us to have one fewer nodes.
> 
> This is also what I expect really.

It would just be nice to build on "simple" building blocks and not have too many complex nodes, that have very special semantics (widen + split into two). It just means that the IR optimizations have to take care of more special cases, rather than following simple rules/optimizations because every IR node does a relatively simple thing.

Maybe you find out that we really need a complex node, and can provide good arguments. Looking forward to what you find :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2332311631


More information about the hotspot-compiler-dev mailing list