RFR: 8350896: Integer/Long.compress gets wrong type from CompressBitsNode::Value [v2]

Emanuel Peter epeter at openjdk.org
Wed Apr 2 10:01:48 UTC 2025


On Wed, 12 Mar 2025 08:20:36 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review comments resolutions
>
> src/hotspot/share/opto/intrinsicnode.cpp line 280:
> 
>> 278:       // used to ascertain known Zero bits of resultant value.
>> 279:         assert(mask_type->lo_as_long() >= 0, "");
>> 280:         jlong clz = count_leading_zeros(mask_type->hi_as_long());
> 
> Suggestion:
> 
>         jlong clz = count_leading_zeros(mask_type->hi_as_long());
>         // The mask has at least clz leading zeros, and hence also the compression
>         // result must have at least clz leading zeros.

I think a comment like this is still missing. You should somehow say that the leading zeros in the mask translate to leading zeros in the result.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23947#discussion_r2024472048


More information about the hotspot-compiler-dev mailing list