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 12:37:27 UTC 2025
On Tue, 25 Nov 2025 10:31:24 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/predicates/assertion/TestStressDuplicateBackedgeWithAssertionPredicate.java line 62:
>>
>>> 60: // The Template Assertion Predicates are still at the outer loop. As a result, we find them to
>>> 61: // be useless in the next predicate elimination call with EliminateUselessPredicates because
>>> 62: // they cannot be found from the inner counted loop. However, we have verification code in place
>>
>> First: cudos on the annotations in this test! Really much appreciated :)
>>
>> I'm a bit confused here. Are you talking about the Template Assertion Predicates of the outer or inner loop here? Because you say both:
>> - `Template Assertion Predicates are still at the outer loop`
>> - `they cannot be found from the inner counted loop`
>> Can you clarify?
>
> Ah, maybe the confusion comes from this:
> - We have an "inner" loop: the one that becomes empty and is removed.
> - And an "inner" loop from the duplicate backedge optimization.
>
> Is this correct? If yes, name them a bit more precisely ;)
>
> Also: are the new inner/outer loops nested? The ascii art suggests that they are in sequence. Maybe drawing some backedges could help?
> First: cudos on the annotations in this test! Really much appreciated :)
Thanks, I'm glad it was helpful!
I updated the comments to make it more explicit what I mean by inner and outer loop. Let me know if that's more clear now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28389#discussion_r2559817197
More information about the hotspot-compiler-dev
mailing list