RFR: 8356647: C2: Excessively strict assert in PhaseIdealLoop::do_unroll [v2]

Emanuel Peter epeter at openjdk.org
Mon May 26 06:35:55 UTC 2025


On Fri, 23 May 2025 08:05:29 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> 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.

Thanks for the additional context :)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25295#discussion_r2106648745


More information about the hotspot-compiler-dev mailing list