[lworld] RFR: 8359345: [lworld] C2 crashes with -XX:ForceNonTearable=*
Tobias Hartmann
thartmann at openjdk.org
Tue Jul 1 08:30:57 UTC 2025
For test method `testFieldLoad1` the graph looks like this after parsing:

Now since [JDK-8354068](https://bugs.openjdk.org/browse/JDK-8354068) `MemNode::optimize_simple_memory_chain` rewires the memory input of strict field load `46 LoadL` to before the membar:

Later, a precedence edge from the membar to the load (now named `15 LoadL`) is added, leading to an unschedulable graph:

[JDK-8354981](https://bugs.openjdk.org/browse/JDK-8354981) added these `MemBarCPUOrders` around flat, atomic stores and then [JDK-8357474](https://bugs.openjdk.org/browse/JDK-8357474) also added them around loads. The same problem exists for `MemBarCPUOrders` emitted by stores. The memory input of following loads will be wired around them which is incorrect.
For now, I disabled skipping past `MemBarCPUOrders` in `MemNode::optimize_simple_memory_chain` and filed [JDK-8361145](https://bugs.openjdk.org/browse/JDK-8361145) for a follow-up investigation.
Thanks,
Tobias
-------------
Commit messages:
- Some more problem listing
- Problem listing for JDK-8361082
- More tests
- Added summary to test
- 8359345: [lworld] C2 crashes with -XX:ForceNonTearable=*
Changes: https://git.openjdk.org/valhalla/pull/1494/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1494&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8359345
Stats: 286 lines in 3 files changed: 286 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/valhalla/pull/1494.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1494/head:pull/1494
PR: https://git.openjdk.org/valhalla/pull/1494
More information about the valhalla-dev
mailing list