RFR: 8356647: C2: Excessively strict assert in PhaseIdealLoop::do_unroll [v2]
Marc Chevalier
mchevalier at openjdk.org
Fri May 23 08:09:38 UTC 2025
On Fri, 23 May 2025 07:10:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - A test
>> - Merge branch 'master' into fix/do_unroll-assert
>> - Relax the assert
>
> src/hotspot/share/opto/loopTransform.cpp line 1911:
>
>> 1909: } else if (loop_head->has_exact_trip_count() && init->is_Con()) {
>> 1910: // We should not be here if we have old_trip_count == max_juint
>> 1911: // it would make trip_count == 2^31 which causes overflow and the situation is overall weird
>
> Can you say something a little more specific than "weird"? As a reader, it's not immediately clear what that may imply.
I've tried to explain the concerns better but tbh, it's also part of the weirdness: it's not clear how inconsistent the state would be and what would and should happen.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25295#discussion_r2104051975
More information about the hotspot-compiler-dev
mailing list