[lworld] Integrated: 8367244: [lworld] C2 compilation fails with assert "no node with a side effect"
Manuel Hässig
mhaessig at openjdk.org
Fri Nov 7 09:53:39 UTC 2025
On Mon, 3 Nov 2025 14:12:55 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
> ## Problem Analysis
>
> The stress test `compiler/valhalla/inlinetypes/TestAcmpWithUnstableIf.java`, which uses the `StressUnstableIfTrap` flag, failed intermittently with the assert "no node with a side effect" during C2 compilation. I tracked down the origin of the failure to the raw store of the unstable if trap stress counter that was missing a memory edge to the backedge phi and thus had no side effect in the loop, which lead to the aforementioned assert. During parsing, the missing memory edge gets discarded with as vestigial parsing state when `do_if()` ends up `stopped()`. However, the effect of the stress counter should still be wired back into the backedge since it will be incremented in the next iteration.
>
> ## Patch Description
>
> To prevent the stress counters memory state being lost to `PreserveJVMState`, I pass it to the caller over an out-parameter and `set_memory` with that node, similar to what is already done for control. This is only necessary for the two last invocation of `do_if()` in `do_acmp()` where they are actually allowed to trap. Further, this PR reenables `StressUnstableIfTrap` in `compiler/valhalla/inlinetypes/TestAcmpWithUnstableIf.java`.
>
> ## Testing
>
> - [x] tier1,tier2,tier3 plus internal stress testing
This pull request has now been integrated.
Changeset: a0ec2441
Author: Manuel Hässig <mhaessig at openjdk.org>
Committer: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/a0ec2441494f9e77b3a8a3db90358db239b27b4d
Stats: 85 lines in 4 files changed: 77 ins; 2 del; 6 mod
8367244: [lworld] C2 compilation fails with assert "no node with a side effect"
Reviewed-by: chagedorn
-------------
PR: https://git.openjdk.org/valhalla/pull/1716
More information about the valhalla-dev
mailing list