[lworld] RFR: 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact

Christian Hagedorn chagedorn at openjdk.org
Thu Jun 5 15:38:02 UTC 2025


We are wrongly setting the result of the meet of two constant `TypeAryPtr` with different nullness as exact:
https://github.com/openjdk/valhalla/blob/aacff31a86a3fc8cbc44a7e993d83c4bf9677055/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestMeetingAryPtr.java#L66-L71

This causes an assertion failure during CCP to not be monotonic. This is now fixed.

There have been other occurrences where we wrongly set exactness even though nullness were different. Most of them have now been fixed with https://github.com/openjdk/valhalla/pull/1470 which corrected some of the wrong handling explicitely. 

Thanks,
Christian

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

Commit messages:
 - 8353180: [lworld] C2: Meeting two constant TypeAryPtr with different nullness is wrongly treated as exact

Changes: https://git.openjdk.org/valhalla/pull/1481/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1481&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8353180
  Stats: 103 lines in 4 files changed: 91 ins; 8 del; 4 mod
  Patch: https://git.openjdk.org/valhalla/pull/1481.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1481/head:pull/1481

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


More information about the valhalla-dev mailing list