On Sat, 4 Jul 2026 07:55:25 GMT, Daisuke Yamazaki <[email protected]> wrote:

>> When `left == right` is known at code generation time, the operands are 
>> necessarily the same oop, so we can jump directly to `L_oops_equal`. 
>> This patch changes both x86 and aarch65 to do that.
>> 
>> I also considered emitting `equal_result` and returning early in that case.
>> I decided not to do that because `LIR_OpSubstitutabilityCheck::emit_code()` 
>> still appends the slow-path stub after `emit_opSubstitutabilityCheck()` 
>> returns.
>> An early return here would skip binding `op->stub()->continuation()`, 
>> leaving the appended stub with an unbound continuation label. 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Daisuke Yamazaki has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Fix emitting the unreachable klass check for identical operands

Thanks @chhagedorn and @TheRealMDoerr for pointing that out. You are correct. 
I initially avoided handling this there 
because I thought the change might become larger, but after looking into again,
it turns out to be quite small.
I’ll update the patch. Thanks again.

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

PR Comment: https://git.openjdk.org/valhalla/pull/2628#issuecomment-4894237506

Reply via email to