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 12:59:24 UTC 2025


On Mon, 30 Jun 2025 05:56:19 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> I don't think there's a case where vectorizing Extract can succeed since it's already a vector op (extract scalar out of vector), so this case would only be needed to prevent assert failures.
>
> I see. But then why not return `false`, just like for the other vector operations?

Whoops, I think that's my mistake! I put the nodes in the switch with the subword types since the base type was short/char, but I should have put it in the switch with the assert. It ended up not causing problems since the Extract nodes can't vectorize, but I've moved it to the assert switch in the latest commit.

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

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


More information about the hotspot-compiler-dev mailing list