RFR: 8291669: [REDO] Fix array range check hoisting for some scaled loop iv [v3]
Roland Westrelin
roland at openjdk.org
Fri Sep 9 12:53:43 UTC 2022
On Fri, 9 Sep 2022 05:47:12 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> 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)`.
>
> I'm just wondering if there's a good reason for bailing out for integer overflows and if the same applies to long overflows. @rwestrel, you added that check with JDK-8278296, do you remember why?
The:
if (scale == min_signed_integer(exp_bt)) {
?
(It's` from JDK-8259609)
The problem I think is for the expression: -min_jint * i
scale here is min_jint initially, stored in a long. It's then multiplied by -1. -min_jint = min_jint when stored in an int but not in a long. When scale is later transformed from a long to an int, some code finds that -(long)min_jint can't be stored in an int.
-------------
PR: https://git.openjdk.org/jdk/pull/9851
More information about the hotspot-compiler-dev
mailing list