[lworld] Integrated: 8378686: [lworld] C2 fails with assert(_gvn.type(n) == TypePtr::NULL_PTR) failed: must be a null constant
Quan Anh Mai
qamai at openjdk.org
Thu Feb 26 03:52:40 UTC 2026
On Wed, 25 Feb 2026 15:43:01 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
> Hi,
>
> value class MyValue {
> MyValue other;
> }
>
> A cyclic field is not aggressively scalarized, so when we obtain an object of `MyValue`, the field `other` stays as a `LoadP`. When we go `getfield` from a `MyValue`, we obtain the `LoadP` into the state map. We have `InlineTypeNode::adjust_scalarization_depth` but it only has its effect if the field is already an `InlineTypeNode`. We need to add a case to scalarize if the obtained field is an oop.
>
> Many thanks to @TobiHartmann for the test case.
>
> Please kindly review, thanks a lot.
This pull request has now been integrated.
Changeset: c7a9b210
Author: Quan Anh Mai <qamai at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/c7a9b210342f3a759a891881ba8516c3f68fb0cf
Stats: 71 lines in 3 files changed: 71 ins; 0 del; 0 mod
8378686: [lworld] C2 fails with assert(_gvn.type(n) == TypePtr::NULL_PTR) failed: must be a null constant
Reviewed-by: thartmann
-------------
PR: https://git.openjdk.org/valhalla/pull/2166
More information about the valhalla-dev
mailing list