[jdk17] RFR: 8269088: C2 fails with assert(!n->is_Store() && !n->is_LoadStore()) failed: no node with a side effect
Roland Westrelin
roland at openjdk.java.net
Thu Jun 24 08:33:48 UTC 2021
In PhaseIdealLoop::try_sink_out_of_loop(), a Store is not expected to
be a candidate for sinking: if a Store is in a loop, there has to be
at least a memory Phi keeping the Store in the loop. In the case of
the failure, a Store has control set in a loop but the Store is not
connected to a loop memory Phi. The reason for that is that the Store
was moved out of loop by PhaseIdealLoop::try_move_store_after_loop()
which moved the Store to the lca of its uses (other than the loop
Phi), in this case another loop.
It doesn't look right that a Store is removed from a loop only to be
added to another one so I propose fixing that by placing the Store
right out of the loop it's being moved out of (similar to
PhaseIdealLoop::try_sink_out_of_loop()) rather than at the lca of
uses.
-------------
Commit messages:
- whitespaces
- fix & test
Changes: https://git.openjdk.java.net/jdk17/pull/133/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=133&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269088
Stats: 86 lines in 2 files changed: 85 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk17/pull/133.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/133/head:pull/133
PR: https://git.openjdk.java.net/jdk17/pull/133
More information about the hotspot-compiler-dev
mailing list