RFR: 8373591: C2: Fix the memory around some intrinsics nodes

Quan Anh Mai qamai at openjdk.org
Fri Dec 12 12:51:41 UTC 2025


On Fri, 12 Dec 2025 12:43:14 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> This is extracted from #28570 , there are 2 issues here:
> 
> - Some intrinsics nodes advertise incorrect `adr_type`. For example, `AryEqNode` reports `adr_type` being `TypeAryPtr::BYTES` (it inherits this from `StrIntrinsicNode`). This is incorrect, however, as it can accept `char[]` inputs, too. Another case is `VectorizedHashCodeNode`, which reports its `adr_type` being `TypePtr::BOTTOM`, but it actually extracts a memory slice and does not consume the whole memory.
> - For nodes such as `StrInflatedCopyNode`, as they consume more than they produce, during scheduling, we need to compute anti-dependencies. This is not the case, so we should fix it by making the nodes kill all the memory they consume. This issue is often not present because these intrinsics are not exposed bare to general usage.
> 
> Please kindly review, thanks a lot.

@eme64 I have extracted the fix of memory around intrinsics nodes in the other PR to this PR and added a unit test for the potential issue.

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

PR Comment: https://git.openjdk.org/jdk/pull/28789#issuecomment-3646349261


More information about the hotspot-compiler-dev mailing list