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:02:37 UTC 2025
On Mon, 16 Jun 2025 06:06:23 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/share/opto/superword.cpp line 2538:
>>
>>> 2536: break;
>>> 2537: default:
>>> 2538: assert(false, "Unexpected node: %s", NodeClassNames[in->Opcode()]);
>>
>> Suggestion:
>>
>> // If this assert it hit, that means that we need to determine if the node can be safely truncated,
>> // and then add it to the list of truncatable nodes or the list of non-truncatable ones just above.
>> // In product, we just return false, which is always correct.
>> assert(false, "Unexpected node: %s", NodeClassNames[in->Opcode()]);
>
> I'm fairly sure that we will hit this assert with a fuzzer or some other RFE soon, and then it will be nice to know quickly what kind of failure we have here.
This is a good point, I've made this change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25440#discussion_r2153586302
More information about the hotspot-compiler-dev
mailing list