RFR: 8307084: C2: Vectorized drain loop is not executed for some small trip counts

Fei Gao fgao at openjdk.org
Wed Aug 13 12:38:53 UTC 2025


On Tue, 10 Dec 2024 15:18:14 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> @chhagedorn might have some reservations about this, but I'll let him comment on his own.
>
> The Assertion Predicate code is changing at the moment. I've been waiting with some patches until the fork. There is more coming now. How urgent is the work of this patch? Otherwise, it might be easier to wait for the changes within the next weeks.

> Can you explain this change?

Hi @eme64 , the core change involving `Predicate` lies in the function
`void CreateAssertionPredicatesVisitor::visit(const TemplateAssertionPredicate& template_assertion_predicate)`
and
`void CreateAssertionPredicatesVisitor::visit(const InitializedAssertionPredicate& initialized_assertion_predicate)`

in `src/hotspot/share/opto/predicates.cpp` line `895` and `905`.

We need `rewire_loop_data_dependencies()` when inserting the vector drain loop both for `TemplateAssertionPredicate` and `InitializedAssertionPredicate`. All code to create a super class here is to make the change above cleaner.

> How urgent is the work of this patch? Otherwise, it might be easier to wait for the changes within the next weeks.

Thanks @chhagedorn . The patch is still WIP. Looking forward to your refactoring.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22629#discussion_r1878354192


More information about the hotspot-compiler-dev mailing list