RFR: 8303511: C2: assert(get_ctrl(n) == cle_out) during unrolling
Roland Westrelin
roland at openjdk.org
Thu Mar 2 09:31:06 UTC 2023
In the same round of loop optimizations:
- `PhaseIdealLoop::remix_address_expressions()` creates a new `AddP`
out of loop. It sets it control to
`n_loop->_head->in(LoopNode::EntryControl)` which, because the loop is
strip mined, is an `OuterStripMinedLoop`.
- The `LoadI` for that `AddP` is found to only have uses outside the
loop and is cloned out of the loop. It's referenced by the outer
loop's safepoint.
- The loop is unrolled. Unrolling follows the safepoint's inputs and
find the new `AddP` with control set to the `OuterStripMinedLoop`
and the assert fires.
No control should be set to an `OuterStripMinedLoop`. The fix is
straightforward and sets the control to the `OuterStripMinedLoop`
entry control.
-------------
Commit messages:
- test
- fix
Changes: https://git.openjdk.org/jdk/pull/12824/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12824&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8303511
Stats: 84 lines in 2 files changed: 82 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/12824.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12824/head:pull/12824
PR: https://git.openjdk.org/jdk/pull/12824
More information about the hotspot-compiler-dev
mailing list