RFR: 8370666: VectorAPI: Add clear comments for vector mask relative code in c2
Xiaohong Gong
xgong at openjdk.org
Mon Jan 12 06:56:37 UTC 2026
On Mon, 12 Jan 2026 05:42:29 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Is this a memory instruction? Because it is called `Load`. If not: can we rename it?
>
> It's not a memory instruction. Like `VectorLoadMask`, it is used to convert a shuffle vector to a platform supported vector. Previously, the shuffle is always a byte vector for all vector types. And this node is used to convert the byte vector to a vector that is needed for the rearrange instructions. It is not needed for some architectures now, since the vector shuffle's payload has been changed to the same integer type of normal vector, i.e. byte, short, int, and long. I searched the code, and noticed it is only used by X86 on specified architectures for specified types now.
> Can you specify a bit more about the inputs and outputs, and what exactly the transformation does?
Seems the existing comments have commented why this node is needed on some architectures. The input is an original shuffle vector from API with specified element types, while the output is a shuffle vector which is transformed to be used for the vector rearrange directly, depending on the backend codegen requirement?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29130#discussion_r2681054525
More information about the hotspot-compiler-dev
mailing list