[lworld] Integrated: 8376791: [lworld] C2 compilation hits assert(!not_flat || !is_flat()) failed: inconsistency

Quan Anh Mai qamai at openjdk.org
Wed Feb 4 15:04:53 UTC 2026


On Wed, 4 Feb 2026 12:41:33 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> The issue is that we blindly assume that the vararg argument is a not flat and not null-free array. This misses 2 factors:
> 
> - With the introduction of nullable flat layouts, it is possible to flatten a default array allocation (e.g. `new Integer[4]`)
> - The node may have its own speculative type already, we need to make sure our optimistic guess does not contradict the existing speculation.
> 
> As a result, I changed the implementation to assume that the exact type is the default refined type of the declared parameter type.
> 
> Testing:
> 
> - [x] tier1-4,valhalla-comp-stress, Linux-x64
> 
> Please kindly review, thanks a lot.

This pull request has now been integrated.

Changeset: 2f212a19
Author:    Quan Anh Mai <qamai at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/2f212a19a7ffd9369505af193422845531e2c690
Stats:     43 lines in 2 files changed: 32 ins; 0 del; 11 mod

8376791: [lworld] C2 compilation hits assert(!not_flat || !is_flat()) failed: inconsistency

Reviewed-by: thartmann

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

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


More information about the valhalla-dev mailing list