RFR: 8315066: Add unsigned bounds and known bits to TypeInt/Long [v53]

Quan Anh Mai qamai at openjdk.org
Thu May 1 07:04:00 UTC 2025


On Thu, 1 May 2025 06:54:52 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - wording
>>  - grammar, more details for non-existence
>
> src/hotspot/share/opto/rangeinference.cpp line 306:
> 
>> 304:     // a value not less than lo and satisfies bits. This is because there is
>> 305:     // always a bit up to first_violation that is 0 in both lo and zeros
>> 306:     // (trivially, it is the bit at first_violation).
> 
> Essencially, you are saying that the addition in the alignment for `new_lo` cannot overflow, right?

Yes, because the bit at alignment is 0, this operation just sets it to 1 and set all bits after to 0. So there is no overflow here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17508#discussion_r2069918044


More information about the hotspot-compiler-dev mailing list