On Fri, 20 Feb 2026 10:46:26 GMT, Benoît Maillard <[email protected]> wrote:

>> This PR adresses a missed optimization in `CmpLNode::Ideal`. It occurs when 
>> when we encode a pointer comparison as `CmpL(OrL(left, right), 0L)` (which 
>> essentially translates to "both operands are null") during parsing in 
>> `do_acmp`, and this comparison can later be folded to a constant in 
>> `CmpLNode::Ideal` because one of the operands has a `NotNull` type. This 
>> optimization hides behind `can_reshape`, so it can only be carried out 
>> during IGVN and not during the initial GVN pass.  To fix this, we just need 
>> to make sure to add the compare to the worklist during parsing.
>> 
>> ### Testing
>> - [x] GitHub Actions
>> - [x] tier1-3, plus some internal testing
>> 
>> Thank you for reviewing!
>
> Benoît Maillard has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Missing IgnoreUnrecognizedVMOptions

Thanks for fixing! Looks good to me.

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

Marked as reviewed by thartmann (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2145#pullrequestreview-3832074451

Reply via email to