RFR: 8360510: C2: Template Assertion Predicates are not cloned to the inner counted loop with -XX:+StressDuplicateBackedge [v2]

Christian Hagedorn chagedorn at openjdk.org
Tue Nov 25 15:50:45 UTC 2025


On Tue, 25 Nov 2025 14:12:04 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Christian Hagedorn 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:
>> 
>>  - Merge branch 'master' into JDK-8360510
>>  - Review Emanuel
>>  - Exclude StressDuplicateBackedge for TestVerifyLoopOptimizationsHitsMemLimit.java
>>  - 8360510: C2: Template Assertion Predicates are not cloned to the inner counted loop with -XX:+StressDuplicateBackedge
>
> test/hotspot/jtreg/compiler/predicates/assertion/TestStressDuplicateBackedgeWithAssertionPredicate.java line 76:
> 
>> 74:             //    Otherwise, we cannot apply the duplicate backedge optimization to the outer loop.
>> 75:             // 4) Found to be empty and removed.
>> 76:             for (int j = 0; j < 10; j++) {}
> 
> I think there is still a mild chance for confusion here about the two "inner" loops.
> 
> You also mix `CountedLoop`, `Counted Loop` and `counted Loop` - OCD triggered 😬

And you're right! Pushed another update :-)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28389#discussion_r2560505506


More information about the hotspot-compiler-dev mailing list