RFR: 8303511: C2: assert(get_ctrl(n) == cle_out) during unrolling [v2]
Roland Westrelin
roland at openjdk.org
Fri Mar 3 13:50:40 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.
Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
Update test/hotspot/jtreg/compiler/loopstripmining/TestAddPAtOuterLoopHead.java
Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12824/files
- new: https://git.openjdk.org/jdk/pull/12824/files/c2787438..f20e29b6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12824&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12824&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 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