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

Emanuel Peter epeter at openjdk.org
Tue Nov 11 16:02:14 UTC 2025


On Mon, 10 Nov 2025 14:29:49 GMT, Fei Gao <fgao at openjdk.org> wrote:

>> Can you quickly say what this loop does with each phi?
>
>> Can you quickly say what this loop does with each phi?
> 
> For each Phi node, referred to as `main_merge_phi`, we create a corresponding `drain_merge_phi` as one of its new data uses, as shown below:
> 
> main_merge_phi  = Phi (pre_out, main_out)
> drain_merge_phi = Phi (drain_out, main_merge_phi)

Thanks for the explanation. You could add that as a code comment, if you did not already do that ;)

>> Ah, you have exact constant results that you compare with. Could be good to state this here as a comment, so that nobody removes this in the future. You are just making sure that the interpreter would have produced the same results.
>> 
>> Still: why not add a run without any flags?
>
> Added a comment in the short summary part for interpreter run. Also added a run without any flags.

Ah, I see. Right, these are all fuzzer tests. I suppose it's fine. But just that you know: internally we also run many tests with combinations of `-Xbatch -XX:-TieredCompilation -Xcomp`, only C1 etc.

How long does this test take to complete with all the runs?

If you are doing `-Xcomp`, I would restrict compilation to the class. Otherwise you essencially spend most time C2 compiling during start up of the VM, and compile a lot of JDK classes, which is really not necessary ;)

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

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


More information about the hotspot-compiler-dev mailing list