RFR: 8350896: Integer/Long.compress gets wrong type from CompressBitsNode::Value [v9]
Emanuel Peter
epeter at openjdk.org
Tue Jun 3 09:28:03 UTC 2025
On Tue, 3 Jun 2025 09:20:57 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix aarch64 failure
>
> 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
> src/hotspot/share/opto/intrinsicnode.cpp line 298:
>
>> 296: // result.hi = 0xEFFFFFFF ^ 0x80000000 = 0x6FFFFFFF
>> 297: // result.lo = 0x80000000
>> 298: //
>
> Same here: why not do a proper `if-else`, and add the comments to each scope directly?
`Result.Hi` -> `result.hi` etc for consistency.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23947#discussion_r2123251808
PR Review Comment: https://git.openjdk.org/jdk/pull/23947#discussion_r2123233772
More information about the hotspot-compiler-dev
mailing list