RFR: 8342692: C2: long counted loop/long range checks: don't create loop-nest for short running loops [v5]

Roland Westrelin roland at openjdk.org
Wed Dec 4 15:58:41 UTC 2024


On Wed, 4 Dec 2024 07:43:35 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/loopTransform.cpp line 140:
>> 
>>> 138:       udiff = uinit_con - ulimit_con;
>>> 139:     }
>>> 140:     julong utrip_count = udiff / ABS(stride_con);
>> 
>> Could `stride_con` be `min_int`?
>
> I wonder if we should start converting all these computations to `noOverflowInt`, just to avoid possible overflows etc.

> Could `stride_con` be `min_int`?

We don't create a counted loop if stride is min_int.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21630#discussion_r1869837776


More information about the hotspot-compiler-dev mailing list