RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v8]

Roland Westrelin roland at openjdk.org
Tue Nov 4 11:21:02 UTC 2025


On Tue, 21 Oct 2025 13:49:12 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

>>> Hi @rwestrel, could you please have a look at the merge conflicts of this PR so that we can progress further with the review of this work?
>> 
>> The conflict is caused by the integration of [JDK-8360031](https://bugs.openjdk.org/browse/JDK-8360031), which relaxes the assertion in https://github.com/openjdk/jdk/blob/430041d366ddf450c2480c81608dde980dfa6d41/src/hotspot/share/opto/memnode.cpp#L4232 which is also touched by this changeset. Is the current assertion in mainline (after JDK-8360031) still valid in the context of this changeset?
>
>> Is the current assertion in mainline (after JDK-8360031) still valid in the context of this changeset?
> 
> I did a bit of testing and updating the asserted invariant to `(outcnt() > 0 && outcnt() <= 2) || Opcode() == Op_Initialize` seems to work.

@robcasloz @eme64 thanks for the reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/24570#issuecomment-3485415006


More information about the hotspot-compiler-dev mailing list