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

Emanuel Peter epeter at openjdk.org
Thu Jun 26 05:52:28 UTC 2025


On Thu, 26 Jun 2025 03:52:20 GMT, Jasmine Karthikeyan <jkarthikeyan at openjdk.org> wrote:

>> Additionallly, it may be good to say why each one operation here is not truncatable. We can also file a follow-up RFE here, to add more investigation. After all, this is a bug-fix and we don't want to work in it too long now.
>
> 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?

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

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


More information about the hotspot-compiler-dev mailing list