RFR: 8374078: C2_MacroAssembler::verify_int_in_range has incorrect early return condition

Quan Anh Mai qamai at openjdk.org
Fri Dec 19 18:07:53 UTC 2025


On Fri, 19 Dec 2025 17:41:29 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Hi,
>> 
>> This PR fixes the incorrect early return condition in `C2_MacroAssembler::verify_int_in_range`. Previously, `lo == min_jint && hi == max_jint` is equivalent to `t == Type::INT`. But this is not true anymore.
>> 
>> Please take a look and leave your reviews, thanks a lot.
>
> Can this be new Type's check functions with comments explaining why `t == Type::INT` is not true any more?

@vnkozlov I don't think it is a good idea. The check is like that specifically because it only cares about `_lo` and `_hi` at the moment. So it seems not to be a property of the `Type`. Furthermore, these tests should take into consideration and emit code to verify other properties of the `Type` in the future anyway.

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

PR Comment: https://git.openjdk.org/jdk/pull/28916#issuecomment-3676018973


More information about the hotspot-compiler-dev mailing list