RFR: 8307131: C2: assert(false) failed: malformed control flow
Roland Westrelin
roland at openjdk.org
Tue May 9 09:57:37 UTC 2023
On Fri, 5 May 2023 15:47:33 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> The IR graph has a loop nest with 2 loops and 2 safepoints. Both
>> safepoints are in the inner loop. One is on the backedge of the inner
>> loop. The inner loop is transformed into a counted loop and that
>> safepoint is removed. The other safepoint is right above the inner
>> loop's exit condition. The outer strip mined loop is constructed and
>> the safepoint is moved to the outer strip mined loop eventhough that
>> safepoint is marked as non deleteable. The inner loop is later on
>> removed, the outer strip mined loop is too, so is the safepoint. What
>> was the outer loop of the 2 loop nest becomes an infinite loop without
>> a safepoint and is considered dead code which in turn causes the
>> assert to fire.
>>
>> The fix I propose is to only build the strip mined loop if the
>> safepoint that's moved to the outer strip mined loop is deleteable.
>
> Good.
@vnkozlov @chhagedorn @TobiHartmann thanks for the reviews.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13826#issuecomment-1539816409
More information about the hotspot-compiler-dev
mailing list