[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
Tue Dec 14 18:00:04 UTC 2021
On Fri, 10 Dec 2021 15:43:52 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> 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
Yes, exactly. You're right, this fixes the wrong thing. But using skeleton predicates instead sounds like a good idea! After having looked at it again, I also think that we can indeed use skeleton predicates to handle this corner case. I'm reworking the fix.
-------------
PR: https://git.openjdk.java.net/jdk18/pull/11
More information about the hotspot-compiler-dev
mailing list