[lworld] RFR: 8378292: [lworld] C2 fails assert(in1->uncast()->Opcode() == Op_LoadKlass && in2->uncast()->Opcode() == Op_LoadKlass) failed: must be LoadKlass

Christian Hagedorn chagedorn at openjdk.org
Fri Feb 20 14:34:29 UTC 2026


On Fri, 20 Feb 2026 08:35:44 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

> When merging in [JDK-8373343](https://bugs.openjdk.org/browse/JDK-8373343), we adapted the code to handle an additional verification case for Valhalla specific `AddP` shapes (`case #10`). It was wrongly assumed that when a `Phi` is present, it must be this new case. However, `case #3` could also contain a phi as seen in `is_captured_store_address()`:
> 
> https://github.com/openjdk/valhalla/blob/ae263e906af1e94bd07c6786c190816e9c104e17/src/hotspot/share/opto/escape.cpp#L3940-L3958
> 
> I propose to revert back to the original assert and just additionally add a check for `case #10`.
> 
> Thanks,
> Christian

Thanks for your review Tobias!

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

PR Comment: https://git.openjdk.org/valhalla/pull/2144#issuecomment-3935232434


More information about the valhalla-dev mailing list