RFR: 8291669: [REDO] Fix array range check hoisting for some scaled loop iv [v3]

Roland Westrelin roland at openjdk.org
Tue Sep 13 12:47:44 UTC 2022


On Tue, 13 Sep 2022 02:50:27 GMT, Pengfei Li <pli at openjdk.org> wrote:

>> 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.
>
> Thanks for explanation. In my understanding, `min_jint` is also a special point where bailing out is required. I should update the condition of `scale_sum < min_signed_integer(exp_bt)` to `scale_sum <= min_signed_integer(exp_bt)`, right?

Yes, you must be right.

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

PR: https://git.openjdk.org/jdk/pull/9851


More information about the hotspot-compiler-dev mailing list