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 06:03:29 UTC 2025


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

>> src/hotspot/share/opto/superword.cpp line 2552:
>> 
>>> 2550:     switch (opc) {
>>> 2551:     case Op_ExtractS:
>>> 2552:     case Op_ExtractC:
>> 
>> Are there any tests for these somewhere?
>
> I ended up encountering `ExtractS` when running `Short128VectorTests.java`, but I thought I should add `ExtractC` to the list as well. Unfortunately I don't think we don't have tests for that one yet because `char` doesn't vectorize yet.

Does it even make sense to vectorize Extract? Is there any case where this actually succeeds? It would be worth filing a follow-up RFE if we don't want to spend the time on this now.

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

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


More information about the hotspot-compiler-dev mailing list