RFR: 8281429: PhiNode::Value() is too conservative for tripcount of CountedLoop [v7]
Vladimir Kozlov
kvn at openjdk.java.net
Fri Apr 29 23:58:35 UTC 2022
On Fri, 29 Apr 2022 14:05:07 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> Hi Vladimir. Thanks for reviewing this.
>
> > There should be correctness tests for MAX_INT,MIN_INT,MAX_LONG,MIN_LONG boundaries, positive and negative strides and `abs(stride) != 1`. All combinations.
>
> That's reasonable but what kind of tests? Executing a simple counted loop that iterates from MIN_INT to MAX_INT is unlikely to lead to an incorrect result even if the iv type is wrong.
I am concern about unsigned arithmetic to calculate new limit for long indexing case. The test could simple fill up an array and you then check that values in it are correct (and no out of bounds references). You can choose big `stride` to run test fast.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7823
More information about the hotspot-compiler-dev
mailing list