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

Quan Anh Mai qamai at openjdk.org
Fri May 2 00:50:32 UTC 2025


On Thu, 1 May 2025 15:40:29 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Emanuel's reviews
>
> src/hotspot/share/opto/rangeinference.cpp line 694:
> 
>> 692:     return i1;
>> 693:   }
>> 694:   const CT* i2 = t2->try_cast<CT>();
> 
> And what is the significance of the `dual` state of i1 and `i2`? Should their `dual` state be the same?
> Can we add some assert here?

I decide to make `TypeIntHelper` a friend of `TypeInt` and use `i1->_is_dual` here instead. I think it makes it clearer.

> src/hotspot/share/opto/type.cpp line 1809:
> 
>> 1807: }
>> 1808: 
>> 1809: bool TypeInt::contains(const TypeInt* t) const {
> 
> Is dual allowed here, or could we assert?

Added this assert and another for the other `contains`

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

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


More information about the hotspot-compiler-dev mailing list