RFR: 8328528: C2 should optimize long-typed parallel iv in an int counted loop [v9]
Kangcheng Xu
kxu at openjdk.org
Thu Sep 19 20:08:43 UTC 2024
On Wed, 18 Sep 2024 18:47:22 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Kangcheng Xu has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 27 additional commits since the last revision:
>>
>> - Merge branch 'master' into long-typed-parallel-iv
>> - use @run driver and Argument.RANDOM_ONCE
>> - Merge branch 'master' into long-typed-parallel-iv
>> - add random strides to tests
>> - fix tests on larger strides
>> - add more expressive comments and test cases
>> - Merge branch 'master' into long-typed-parallel-iv
>> - update comments to clarify on type casting
>> - add pseudocode for subgraphs before/after the transformation
>> - remove WIP support for long counted loops
>> - ... and 17 more: https://git.openjdk.org/jdk/compare/f7f19361...20bdc791
>
> test/hotspot/jtreg/compiler/loopopts/parallel_iv/TestParallelIvInIntCountedLoop.java line 51:
>
>> 49: stride = new Random().nextInt(1, Integer.MAX_VALUE / 16);
>> 50: stride2 = stride * new Random().nextInt(1, 16);
>> 51: }
>
> So `stride` and `stride2` are compile-time constants. That is intended, right?
Yes, this is intended. I followed [your suggestion](https://github.com/openjdk/jdk/pull/18489#discussion_r1638725652) to expand testing with some random numbers. Please let me know if I misunderstood.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18489#discussion_r1767531620
More information about the hotspot-compiler-dev
mailing list