RFR: 8346184: C2: assert(has_node(i)) failed during split thru phi
Roland Westrelin
roland at openjdk.org
Wed Dec 18 17:03:17 UTC 2024
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`.
-------------
Commit messages:
- test
- fix
Changes: https://git.openjdk.org/jdk/pull/22818/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22818&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8346184
Stats: 95 lines in 2 files changed: 81 ins; 14 del; 0 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