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

Pengfei Li pli at openjdk.org
Mon Aug 29 08:02:15 UTC 2022


On Thu, 25 Aug 2022 12:41:17 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> My intention for this is to check INT overflow only. As this logic is shared by both INT and LONG, and we are using `java_add(jlong, jlong)` to add two INT scales, the addition result may only exceed the bounds of INT. For LONG scale values, it may overflow but that's fine because the result of `java_add()` wraps, so I don't think we need to check that for LONGs.
>
> Ok. I think that's all right but the code needs a more detailed comment.

Thanks for this suggestion. I have added more comments in my latest commit.

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

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


More information about the hotspot-compiler-dev mailing list