[lworld] Integrated: 8359345: [lworld] C2 crashes with -XX:ForceNonTearable=*
Tobias Hartmann
thartmann at openjdk.org
Tue Jul 1 12:38:03 UTC 2025
On Mon, 30 Jun 2025 12:20:47 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> 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 in `PhaseCFG::insert_anti_dependences`, a precedence edge from the membar to the load (now named `15 LoadL`) is added, because the type of the `CastI2N` is `TypeNarrowOop::BOTTOM` and thus `AliasType::is_rewritable` is true (it should be false). The resulting graph is unschedulable:
> 
>
> [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 and an anti-dependency will be added.
>
> The fix is to change `CastI2NNode` to a `TypeNode` that carries the exact type. This ways we can also avoid the `CastPPNode` after the decode.
>
> Thanks,
> Tobias
This pull request has now been integrated.
Changeset: a565d8be
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/a565d8bee48e4cf6bbcbb7e360c94a05fed02e3f
Stats: 290 lines in 4 files changed: 285 ins; 2 del; 3 mod
8359345: [lworld] C2 crashes with -XX:ForceNonTearable=*
Co-authored-by: Quan Anh Mai <qamai at openjdk.org>
-------------
PR: https://git.openjdk.org/valhalla/pull/1494
More information about the valhalla-dev
mailing list