RFR: 8351623: VectorAPI: Add SVE implementation of subword gather load operation [v2]
Bhavana Kilambi
bkilambi at openjdk.org
Wed Jul 16 07:43:41 UTC 2025
On Tue, 15 Jul 2025 01:24:08 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/aarch64_vector.ad line 5990:
>>
>>> 5988: %}
>>> 5989:
>>> 5990: instruct vmaskwiden_hi_sve(pReg dst, pReg src) %{
>>
>> can both the hi and lo widen rules be combined into a single one as the arguments are the same? or would it make it less understandable?
>
> The main problem is that we cannot get the flag of `__is_lo` easily from the relative machnode as far as I know.
Agreed. I remember I had the same problem with `requires_strict_order` field in ReductionNodes. Thanks.
>> src/hotspot/cpu/aarch64/aarch64_vector_ad.m4 line 352:
>>
>>> 350: // SVE requires vector indices for gather-load/scatter-store operations
>>> 351: // on all data types.
>>> 352: bool Matcher::gather_scatter_needs_vector_index(BasicType bt) {
>>
>> There's already a function that tests for `UseSVE > 0` here - https://github.com/openjdk/jdk/blob/bcd86d575fe0682a234228c18b0c2e817d3816da/src/hotspot/cpu/aarch64/matcher_aarch64.hpp#L36
>>
>> Can it be reused?
>
> Do you mean directly using `supports_scalable_vector` instead of the new added method in mid-end? I'm afraid we cannot use it. Because on X86, the indexes for subword types are passed with address of the index array, while it's a vector for other types even on AVX-512.
>
> But yes, we can call `supports_scalable_vector()` in the new added method for AArch64.
Got it, thanks! I missed the point that this was added in the mid-end.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2209554006
PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2209551617
More information about the hotspot-compiler-dev
mailing list