RFR: 8369258: C2: enable ReassociateInvariants for all loop types [v2]

Quan Anh Mai qamai at openjdk.org
Wed Oct 15 09:42:33 UTC 2025


On Wed, 15 Oct 2025 09:38:30 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Roland Westrelin 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 four additional commits since the last revision:
>> 
>>  - review
>>  - Merge branch 'master' into JDK-8369258
>>  - test fixes
>>  - test and fix
>
> test/hotspot/jtreg/compiler/loopopts/TestReassociateInvariants.java line 63:
> 
>> 61:     @IR(failOn = { IRNode.COUNTED_LOOP, IRNode.LONG_COUNTED_LOOP })
>> 62:     @IR(counts = { IRNode.LOOP, "1" })
>> 63:     @Arguments(values = { Argument.NUMBER_42, Argument.NUMBER_42 })
> 
> What are we verifying here, should this fail on some kind of range check?

Also, why are these not recognized as `CountedLoop`s, it seems we need to fix them, too?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27666#discussion_r2431870029


More information about the hotspot-compiler-dev mailing list