RFR: 8298824: C2 crash: assert(is_Bool()) failed: invalid node class: ConI
Christian Hagedorn
chagedorn at openjdk.org
Fri Dec 16 09:46:12 UTC 2022
[JDK-8292889](https://bugs.openjdk.org/browse/JDK-8292289) added the following optimization to `BoolNode::Ideal()` for patterns that include `CMoveI` nodes:
https://github.com/openjdk/jdk/blob/fa322e40b68abf0a253040d14414d41f4e01e028/src/hotspot/share/opto/subnode.cpp#L1465-L1472
However, we could have a `CMoveI` during IGVN that will later be folded because the `Bool` condition node was replaced by a constant but IGVN has not processed this node, yet:

We fail when trying to call `as_Bool()` on `28 ConI`. The fix is straight forward to additionally check if we actually have a `BoolNode`.
Thanks,
Christian
-------------
Commit messages:
- 8298824: C2 crash: assert(is_Bool()) failed: invalid node class: ConI
Changes: https://git.openjdk.org/jdk/pull/11705/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11705&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8298824
Stats: 53 lines in 2 files changed: 52 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/11705.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11705/head:pull/11705
PR: https://git.openjdk.org/jdk/pull/11705
More information about the hotspot-compiler-dev
mailing list