RFR: 8346184: C2: assert(has_node(i)) failed during split thru phi [v3]

Tobias Hartmann thartmann at openjdk.org
Fri Jan 10 07:46:45 UTC 2025


On Thu, 9 Jan 2025 13:04:25 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> The assert fires during split thru phi because a call to `Identity`
>> returns a new node (a constant null pointer). That happens because a
>> `Load`, once pushed thru phi, can be constant folded because it loads
>> from a newly allocated array. `Identity` shouldn't return new
>> nodes. When split thru phi runs, in this case, `Value` should be the
>> one returning constant null, not `Identity`. There is logic for that
>> in `LoadNode::Value` but it's after some other checks that cause
>> `Value` to return too early.
>> 
>> To fix this, I propose reordering checks in `LoadNode::Value`.
>
> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/hotspot/share/opto/memnode.cpp
>   
>   Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>

Looks good to me.

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22818#pullrequestreview-2541737466


More information about the hotspot-compiler-dev mailing list