[jdk18] RFR: 8278420: C2: assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect

Christian Hagedorn chagedorn at openjdk.java.net
Fri Dec 10 15:51:52 UTC 2021


The test case fails with the assertion when an actual unreachable store node with only uses outside of the loop is tried to be sunk out of a dead loop in split-if. This is quite an edge case in which C2 is not able to remove the inner loop but the store for `iFldArr2` inside this loop dies due to improved type information after peeling. This removes some memory phis as well and leaves the store `iFldArr1` with only outside the loop uses. A more detailed explanation how we end up in this situation is shown in the comments of the test case.

This suggests that the assertion is too strong. I propose to relax the assertion and bail out if we are trying to sink a store node. However, I don't think that we will reach this code with `LoadStore` nodes as they have other memory outputs inside a loop, preventing to reach this assertion code.

Thanks,
Christian

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

Commit messages:
 - 8278420: C2: assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect

Changes: https://git.openjdk.java.net/jdk18/pull/11/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=11&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8278420
  Stats: 123 lines in 2 files changed: 122 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk18/pull/11.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/11/head:pull/11

PR: https://git.openjdk.java.net/jdk18/pull/11


More information about the hotspot-compiler-dev mailing list