RFR: 8333394: C2: assert(bol->is_Opaque4() || bol->is_OpaqueInitializedAssertionPredicate()) failed: Opaque node of non-null-check or of Initialized Assertion Predicate
Christian Hagedorn
chagedorn at openjdk.org
Mon Jun 3 08:34:40 UTC 2024
[JDK-8330386](https://bugs.openjdk.org/browse/JDK-8330386) added some additional asserts to ensure that we are dealing with Template Assertion Predicates and/or non-null-checks which both use `Opaque4` nodes. I've also improved the following bailout from `!= 2` to `< 2` since the original comment suggested that if there is a test without 2 inputs, it must be a dead test (i.e. I assumed a `ConNode`):
https://github.com/openjdk/jdk/blob/91101f0d4fc8e06d0d74e06361db6ac87efeeb8e/src/hotspot/share/opto/loopTransform.cpp#L1204-L1206
But apparently, we could also have the following, also dead, `If` with a condition with 3 inputs (`505 Phi`) created by `split_thru_phi`:

I therefore revert the check back to `!= 2` and improved the comment.
Thanks,
Christian
-------------
Commit messages:
- 8333394: C2: assert(bol->is_Opaque4() || bol->is_OpaqueInitializedAssertionPredicate()) failed: Opaque node of non-null-check or of Initialized Assertion Predicate
Changes: https://git.openjdk.org/jdk/pull/19517/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19517&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8333394
Stats: 61 lines in 2 files changed: 58 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/19517.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19517/head:pull/19517
PR: https://git.openjdk.org/jdk/pull/19517
More information about the hotspot-compiler-dev
mailing list