RFR: 8303511: C2: assert(get_ctrl(n) == cle_out) during unrolling [v2]
Tobias Hartmann
thartmann at openjdk.org
Tue Mar 7 08:05:12 UTC 2023
On Fri, 3 Mar 2023 13:50:40 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.
>
> 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>
Looks good to me.
-------------
Marked as reviewed by thartmann (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12824
More information about the hotspot-compiler-dev
mailing list