RFR: 8375038: C2: Enforce that Ideal() returns the root of the subgraph if any change was made by checking the node hash [v5]
Benoît Maillard
bmaillard at openjdk.org
Tue Feb 10 08:50:50 UTC 2026
On Tue, 10 Feb 2026 08:26:07 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:
>> Benoît Maillard has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Changed copyright on wrong file - hpp instead of cpp
>> - Update copyright year
>
> src/hotspot/share/opto/intrinsicnode.cpp line 50:
>
>> 48: if (can_reshape) {
>> 49: Node* mem = in(MemNode::Memory);
>> 50: // If mem input is a MergeMem, get the desired slice
>
> It might be obvious, but... I don't understand why it was wrong.
If `transform` makes changes to the memory input, but the resulting node is not a `MergeMem`, then we will return `nullptr` here. The hash will still be different (as the input has changed), thus triggering the assert.
And in any case `transform` should not be called here, we will be notified anyway if an input changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29421#discussion_r2786623486
More information about the hotspot-dev
mailing list