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

Roland Westrelin roland at openjdk.org
Thu Jan 9 13:04:25 UTC 2025


> 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>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22818/files
  - new: https://git.openjdk.org/jdk/pull/22818/files/f768e40b..695d825f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22818&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22818&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22818.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22818/head:pull/22818

PR: https://git.openjdk.org/jdk/pull/22818


More information about the hotspot-compiler-dev mailing list