RFR: 8336759: C2: int counted loop with long limit not recognized as counted loop [v2]
Kangcheng Xu
kxu at openjdk.org
Tue Dec 3 21:48:59 UTC 2024
On Tue, 3 Dec 2024 09:30:21 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:
>>
>> implement suggested changes from @chhagedorn's review
>
> test/hotspot/jtreg/compiler/loopopts/TestIntCountedLoopLongLimit.java line 41:
>
>> 39: */
>> 40: public class TestIntCountedLoopLongLimit {
>> 41: private static final Random RNG = jdk.test.lib.Utils.getRandomInstance();
>
> I suggest to rather use an `import` instead of a fully qualified name:
> Suggestion:
>
> import jdk.test.lib.Asserts;
> import jdk.test.lib.Utils;
>
> import java.util.Random;
>
> /**
> * @test
> * @bug 8336759
> * @summary test long limits in int counted loops are speculatively converted to int for counted loop
> * optimizations
> * @library /test/lib /
> * @requires vm.compiler2.enabled
> * @run driver compiler.loopopts.TestIntCountedLoopLongLimit
> */
> public class TestIntCountedLoopLongLimit {
> private static final Random RNG = Utils.getRandomInstance();
Oops. I don't know how that happened. Nice catch!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22449#discussion_r1868407027
More information about the hotspot-compiler-dev
mailing list