On Mon, 8 Dec 2025 10:39:51 GMT, Emanuel Peter <[email protected]> wrote:

>> test/hotspot/jtreg/compiler/vectorapi/TestFloat16VectorOperations.java line 
>> 134:
>> 
>>> 132:                            .intoArray(output, i);
>>> 133:         }
>>> 134:         for (; i < LEN; i++) {
>> 
>> Will this not result in autovectorization instead and also overwrite the 
>> `output` array results from vectorapi which were previously computed?
>
> Yes: there could be auto-vectorization.
> No: `i` is not reset, it keeps counting from where `i < 
> SPECIES.loopBound(LEN)` fails, and handles the tail, right?
> 
> It could be good to run this test once with and once without auto 
> vectorization, just to make sure the vectors you see are from the Vector API, 
> and not auto vectorization.

Thanks. I missed that `i` isn't being reinitialised/reset again. Do we even 
need the tail loop in this case when the `LEN = 2048`? We may not even have any 
tail iterations?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r2598233546

Reply via email to