On Fri, 3 Jul 2026 12:08:32 GMT, Roland Westrelin <[email protected]> wrote:

>> This is a collection of simple changes requested int the mainline PR.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Roland Westrelin has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Tobias' comments

src/hotspot/share/c1/c1_Canonicalizer.cpp line 648:

> 646:       // Interface casts can't be statically optimized away since 
> verifier doesn't
> 647:       // enforce interface types in bytecode.
> 648:       if (!is_interface && klass->is_subtype_of(x->klass())) {

Do we still need to check for obj->is_null_free() here?

src/hotspot/share/c1/c1_Canonicalizer.cpp line 655:

> 653:     }
> 654:     // checkcast of null returns null for non null-free klasses
> 655:     if (!x->is_null_free() && obj->is_null_obj()) {

Suggestion:

    if (obj->is_null_obj()) {

Isn't !x->is_null_free() always true here?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2624#discussion_r3522078331
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2624#discussion_r3522075849

Reply via email to