RFR: 8291669: [REDO] Fix array range check hoisting for some scaled loop iv [v3]
Pengfei Li
pli at openjdk.org
Fri Sep 9 03:33:45 UTC 2022
On Thu, 8 Sep 2022 11:49:58 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Pengfei Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update p_short_scale compuation
>
> src/hotspot/share/opto/loopTransform.cpp line 2776:
>
>> 2774: // This logic is shared by int and long. For int, the result may overflow
>> 2775: // as we use jlong to compute so do the check here. Long result may also
>> 2776: // overflow but that's fine because result wraps.
>
> But doesn't this mean that we bail out for integer overflows while not bailing out for long overflows?
Yes, it does. If this inconsistency doesn't look good, I could also try adding long overflow checks just like what we have in utility function `bool add_overflows(T x, T y)`.
-------------
PR: https://git.openjdk.org/jdk/pull/9851
More information about the hotspot-compiler-dev
mailing list