RFR: 8350177: C2 SuperWord: Integer.numberOfLeadingZeros, numberOfTrailingZeros, reverse and bitCount have input types wrongly turncated for byte and short [v6]

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Mon Jun 30 03:55:42 UTC 2025


On Thu, 26 Jun 2025 05:50:07 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> It looks like this was because the test has loops that call the vector API, so when the loop gets unrolled it seems that reduction nodes that were created can show up here: https://github.com/openjdk/jdk/blob/1ca008fd02496dc33e2707c102560cae1690fba5/test/jdk/jdk/incubator/vector/Byte128VectorTests.java#L3710-L3721
>
> Should we just handle all vector nodes together, and prevent that any of them are truncated?

I think that's a good idea. I think rather than adding nodes specifically by opcode it might be better to mark any nodes with a base type of TypeVect as non-truncating. I've pushed a commit that should handle this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25440#discussion_r2174159984


More information about the hotspot-compiler-dev mailing list