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
Thu Jun 26 03:55:31 UTC 2025
On Wed, 25 Jun 2025 06:48:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/superword.cpp line 2600:
>>
>>> 2598: case Op_XorReductionV:
>>> 2599: case Op_MaxReductionV:
>>> 2600: case Op_MinReductionV:
>>
>> Why do these vector nodes even end up here? Is that expected?
>
> 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
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25440#discussion_r2168044574
More information about the hotspot-compiler-dev
mailing list