On Tue, 3 Nov 2026 16:11:07 GMT, Emanuel Peter <[email protected]> wrote:

>> @eme64 Thanks for the review! I've updated the test based on your feedback.
>> 
>> - Added 10 vector types: all six element types for 128-bit, and 
>> Byte/Short/Int/Float for 64-bit.
>> - Excluded `LongVector64` and `DoubleVector64`, which have a single lane:
>>   - `LongVector64`: C2 rejects both load and reduction on aarch64 and x86.
>>   - `DoubleVector64`: rejected on aarch64. On x86, the load is allowed, but 
>> the reduction is still rejected.
>> 
>> (x86 was checked under Rosetta)
>> 
>> As for floats, both `FloatVector128` and `FloatVector64` decode as 
>> `Location::vector`.
>
> Any chance you could just iterate over ALL vector types (element types and 
> sizes), including `Float16Vector` as well?
> 
> I know that not all of those actually will generate vectors on all platforms. 
> But it would still be good to exercise all variants, in case more of them are 
> supported by hardware in the future. The SA should generate something 
> sensible for all cases, right? So either a SIMD vector or the object wrapping 
> the array payload.
> 
> You can of course also have a list of vector types where you expect to get 
> the SIMD vector, and and assert that - as you are doing now.

@eme64  I've updated the test based on your feedback.

* The test now iterates over all 35 vector types, including `Float16Vector`.
* All vectors must be found in one of the following forms, and the test fails 
if any is missing:
  * Scalar-replaced object: if the payload is a SIMD vector 
(`Location::vector`), the type is recorded as SIMD.
  * Heap object: the payload must be a primitive array.
* Vector types expected to be SIMD are kept in a separate list, and the test 
asserts that they are recorded as SIMD. The list contains the 19 types that 
were SIMD on all environments below: 128-bit and Max for every element type, 
plus 64-bit Byte/Short/Int/Float/Float16.

| Environment | SIMD count | Where |
|---|---|---|
| aarch64 NEON 128-bit | 19 | Mac Studio |
| aarch64 SVE2 128-bit | 19 | GHA windows-aarch64 |
| x64 AVX2 | 27 | AMD Ryzen 5 3600X |
| x64 AVX-512 | 34 | GHA windows-x64 |

`LongVector64` was not SIMD on any environment, and `DoubleVector64` was SIMD 
only on x64.

Note that the SA tests are skipped on GHA Linux runners due to ptrace 
restrictions.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33665#discussion_r4472989560

Reply via email to