JDK-8345681 : [lworld] C2: TypeAryPtr::is_null_free() does not work for any null-free array
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2024-12-06
  • Updated: 2025-02-28
  • Resolved: 2025-02-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaResolved
Related Reports
Duplicate :  
Relates :  
Description
Currently, TypeAryPtr::is_null_free() only returns null if the element type is an inline type, checked with is_inlinetypeptr(). However, we could also have a super type that merges two null free arrays - either object or an abstract value type for which is_inlinetypeptr() returns false because it does not have a backing ciInlineKlass.

We should update TypeAryPtr::is_null_free() to consider any null-free array, including autobox caches.
Comments
I hit this multiple times when working on JDK-8341767 and will fix it with this change. Closing as duplicate.
28-02-2025

As a result of this, Parse::create_speculative_inline_type_array_checks will call speculate_non_null_free_array although the array is actually known to be null free.
27-02-2025