RFR: 8370666: VectorAPI: Add clear comments for vector relative code in c2 [v3]

Emanuel Peter epeter at openjdk.org
Fri Jan 16 08:48:49 UTC 2026


On Wed, 14 Jan 2026 05:41:26 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> The VectorMask implementation in Vector API involves complex interactions between types, nodes, and platform-specific
>> features, making the related code in HotSpot difficult to understand and review.
>> 
>> This patch adds comprehensive comments for vector mask related types, nodes, and methods in C2 to improve code clarity and
>> maintainability.
>> 
>> Note: This patch only adds comments; no functional changes are made.
>
> Xiaohong Gong has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update comments in type.cpp

src/hotspot/share/opto/vectornode.hpp line 1912:

> 1910: // Unsigned vector cast operations can only be used in Vector API unsigned
> 1911: // extensions between integral types so far. E.g., extending byte to float
> 1912: // is not supported now.

Actually, we could totally implement it for the Auto Vectorizer. It would be methods like `Byte.toUnsignedInt`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29130#discussion_r2697519994


More information about the hotspot-compiler-dev mailing list