RFR: 8303511: C2: assert(get_ctrl(n) == cle_out) during unrolling
Vladimir Kozlov
kvn at openjdk.org
Thu Mar 2 17:36:22 UTC 2023
On Thu, 2 Mar 2023 09:24:17 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> 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.
Yes, this looks good.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12824
More information about the hotspot-compiler-dev
mailing list