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

Emanuel Peter epeter at openjdk.org
Tue Jan 20 13:52:55 UTC 2026


On Mon, 19 Jan 2026 15:48:48 GMT, Fei Gao <fgao at openjdk.org> wrote:

>> At least in your code, it would read much better if it was called `InsertPost`
>
>> I have trouble understanding the comments here (not your fault, it was here already). I'm also wondering if this is only used for `post_loop`? If so, maybe we could rename it, and improve the comments here?
> 
> `ControlAroundStripMined` is not used only for `post_loop`; it is also used by `do_peeling()` and `duplicate_loop_backedge()`. For that reason, I’m afraid renaming it to something like `InsertPost` wouldn’t be appropriate.
> 
> Based on my understanding, `ControlAroundStripMined` means that only the inner strip-mined loop is cloned, and a control-flow decision is inserted around the inner clone, allowing the exit control flow either to the inner clone or to the outer strip-mined loop.
> 
> How about refining the comments as follows:
> 
> ...
>   ControlAroundStripMined = 2, // Only clone the inner strip-mined loop and insert
>                                // control flow around it. Exit control flow
>                                // branches either to inner clone or to the outer
>                                // strip-mined loop.
>   InsertVectorizedDrain = 3    // Only clone  the inner strip-mined vector loop and
>                                // insert control flow that branches either to the
>                                // cloned inner loop or to the scalar post loop.
> ...

Ok, that sounds good :)

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

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


More information about the hotspot-compiler-dev mailing list