RFR: 8350177: C2 SuperWord: Integer.numberOfLeadingZeros, numberOfTrailingZeros, reverse and bitCount have input types wrongly turncated for byte and short [v3]
Jasmine Karthikeyan
jkarthikeyan at openjdk.org
Wed Jun 18 04:06:30 UTC 2025
On Mon, 16 Jun 2025 06:01:17 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/superword.cpp line 2521:
>>
>>> 2519: if (VectorNode::is_shift_opcode(opc)) {
>>> 2520: return false;
>>> 2521: }
>>
>> Is right shift also not truncatable? Can you add a comment why?
>
> Here you did a return in assert.
Shifts are the special case I mentioned earlier, where we consider them non-truncating to get a more precise type from input loads. I've added a comment mentioning it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25440#discussion_r2153589837
More information about the hotspot-compiler-dev
mailing list