RFR: 8333394: C2: assert(bol->is_Opaque4() || bol->is_OpaqueInitializedAssertionPredicate()) failed: Opaque node of non-null-check or of Initialized Assertion Predicate [v2]

Christian Hagedorn chagedorn at openjdk.org
Mon Jun 3 13:12:16 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`:
> 
> ![image](https://github.com/openjdk/jdk/assets/17833009/003ad32a-a675-49f2-a263-7ca28d1faf82)
> 
> I therefore revert the check back to `!= 2` and improved the comment.
> 
> Thanks,
> Christian

Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision:

  Update test/hotspot/jtreg/compiler/predicates/assertion/TestIfWithPhiInput.java
  
  Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/19517/files
  - new: https://git.openjdk.org/jdk/pull/19517/files/5eb94738..b435157a

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

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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