[lworld] RFR: 8376702: [lworld] MemNode::optimize_simple_memory_chain asserts with "invalid node class: Con"

Quan Anh Mai qamai at openjdk.org
Mon Feb 2 17:59:08 UTC 2026


Hi,

I cannot manage to reproduce the issue, and it seems to fail only once in our CI. From the log, it seems that the issue is due to the fact that the pointer input to the `Load` is a `Proj` but its input dies, so the cast `as_Multi` in `try_optimize_strict_final_load_memory` fails. I can see a similar check in `MemNode::optimize_simple_memory_chain`. As a result, it is reasonable to just return the top here.

Please take a look and leave your review, thanks a lot.

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

Commit messages:
 - Catch the cases when the pointer dies

Changes: https://git.openjdk.org/valhalla/pull/2016/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2016&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8376702
  Stats: 6 lines in 1 file changed: 3 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/valhalla/pull/2016.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2016/head:pull/2016

PR: https://git.openjdk.org/valhalla/pull/2016


More information about the valhalla-dev mailing list