RFR: 8328528: C2 should optimize long-typed parallel iv in an int counted loop

Kangcheng Xu kxu at openjdk.org
Wed Apr 10 20:07:17 UTC 2024


On Fri, 5 Apr 2024 19:03:54 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Currently, parallel iv optimization only happens in an int counted loop with int-typed parallel iv's. This PR adds support for long-typed iv to be optimized. 
>> 
>> Additionally, this ticket contributes to the resolution of [JDK-8275913](https://bugs.openjdk.org/browse/JDK-8275913). Meanwhile, I'm working on adding support for parallel IV replacement for long counted loops which will depend on this PR.
>
> Do we also handle the reverse, int-typed parallel iv in a long counted loop?
> 
> On a related topic, I noticed that checks for is_range_check_if seem to require the type to match the loop type, but I wonder if that could be relaxed.

@dean-long 

No, it doesn't at this stage. C2 never supported parallel iv of any type in long counted loops. However, I'm working on a patch adding supports for long and int iv in long counted loops. Since there are code dependencies, I'd prefer to have this pr merged first.

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

PR Comment: https://git.openjdk.org/jdk/pull/18489#issuecomment-2048346726


More information about the hotspot-compiler-dev mailing list