[lworld] RFR: 8376791: [lworld] C2 compilation hits assert(!not_flat || !is_flat()) failed: inconsistency [v2]
Quan Anh Mai
qamai at openjdk.org
Wed Feb 4 13:25:30 UTC 2026
> 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:
>
> - [ ] tier1-4,valhalla-comp-stress, Linux-x64
>
> Please kindly review, thanks a lot.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
speculative may not be an aryptr
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/2030/files
- new: https://git.openjdk.org/valhalla/pull/2030/files/862a8aea..887017b3
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=2030&range=01
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2030&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/valhalla/pull/2030.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2030/head:pull/2030
PR: https://git.openjdk.org/valhalla/pull/2030
More information about the valhalla-dev
mailing list