[lworld] Integrated: 8355299: [lworld] C2 compilation fails with "unexpected yanked node"

Tobias Hartmann thartmann at openjdk.org
Thu Apr 24 13:22:16 UTC 2025


On Thu, 24 Apr 2025 13:15:45 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> We hit an assert in the register allocator because a `DecodeN` is kept alive by a `MemBarVolatile`:
> 
> o183 ConvL2I === _ o182 [[ o184 ]] #int
> o184 CastI2N === o179 o183 [[ o419 ]]
> o419 DecodeN === _ o184 [[ o187 65 ]] #float[int:>=0] (java/lang/Cloneable,java/io/Serializable):exact *
> o187 MemBarVolatile === o179 o1 o180 o1 o1 o419 [[ o188 o189 64 ]]
>  65 membar_volatile === 67 0 94 0 0 o419 [[ 66 ]] !jvms: TestGenerated::test11 @ bci:2 (line 201)
> 
> 
> The membar is emitted by `InlineTypeNode::convert_from_payload` to prevent a `CastI2N` from floating below a safepoint. This is necessary to avoid having the raw pointer span a safepoint, making it opaque to the GC.
> 
> On second thought, I don't think we need a membar to prevent this from happening. I removed it and added a comment explaining the details. All tests, including our stress testing, still pass.
> 
> Thanks,
> Tobias

This pull request has now been integrated.

Changeset: e1280b3e
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/e1280b3e11a98d98c0fdad73ce9c8bb9d2417a70
Stats:     9 lines in 2 files changed: 5 ins; 1 del; 3 mod

8355299: [lworld] C2 compilation fails with "unexpected yanked node"

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

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


More information about the valhalla-dev mailing list