[lworld] RFR: 8355317: [lworld] C2 Runtime load_unknown_inline should not return null-free type
Tobias Hartmann
thartmann at openjdk.org
Wed Apr 23 13:11:52 UTC 2025
We incorrectly mark the result of `load_unknown_inline` as null-free which is not correct anymore after [JDK-8341767](https://bugs.openjdk.org/browse/JDK-8341767) because nullable arrays can now be flat as well.
I also noticed that the optimization added by [JDK-8228622](https://bugs.openjdk.org/browse/JDK-8228622) assumes that when we load from an unknown array and then cast the result to a non-value class, we can deduce that the array is not flat if the cast succeeds. That only applies to null-free, flat but not to nullable, flat arrays because null will pass the cast. I filed [JDK-8355382](https://bugs.openjdk.org/browse/JDK-8355382) to follow up on this.
Thanks,
Tobias
-------------
Commit messages:
- 8355317: [lworld] C2 Runtime load_unknown_inline should not return null-free type
Changes: https://git.openjdk.org/valhalla/pull/1441/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1441&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8355317
Stats: 60 lines in 5 files changed: 51 ins; 2 del; 7 mod
Patch: https://git.openjdk.org/valhalla/pull/1441.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1441/head:pull/1441
PR: https://git.openjdk.org/valhalla/pull/1441
More information about the valhalla-dev
mailing list