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

Emanuel Peter epeter at openjdk.org
Tue Jun 3 09:31:55 UTC 2025


On Tue, 3 Jun 2025 09:25:01 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/intrinsicnode.cpp line 288:
>> 
>>> 286:     //     For constant mask strictly less than zero, maximum result value will be
>>> 287:     //     same as mask value with its sign bit flipped, assuming all but last read
>>> 288:     //     source bits are set to 1.
>> 
>> Suggestion:
>> 
>>     //     For constant mask strictly less than zero, the maximum result value will be
>>     //     the same as the mask value with its sign bit flipped, assuming all source bits but the last
>>     //     are set to 1.
>
> Honestly, I don't understand the sign flip... hmm

Ah, you are just masking off the sign bit... right. Makes sense.

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

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


More information about the hotspot-compiler-dev mailing list