RFR: 8351623: VectorAPI: Add SVE implementation of subword gather load operation [v3]
Xiaohong Gong
xgong at openjdk.org
Mon Sep 8 02:33:14 UTC 2025
On Fri, 5 Sep 2025 10:32:58 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> To me a `false` means this: If we support gater/scalter, then we do not need a vector index, we can do without it.
>
> Is that correct?
Thanks for your review! Actually gather/scatter always need an index input. What this function want to decide is how the index elements are passed to the operations.
It doesn't take an assumption whether vector gather_load/scatter_store is supported or not in backend. It just checks whether the `index` input of such operations requires a vector register or an address which stores the indexes. Currently, on x86, it passes an array address for subword types (the indexes are then will be loaded one-by-one in backend codegen). However, on AArch64, we requires it a vector type for all types instead (the indexes have been loaded and saved into vector registers in IR level).
> The current platform does not support vector gather-load or scatter-store at all.
I'm sorry that I didn't clarify very clear about @fg1417 's second statement. Whether the current platform supports vector gather-load/scatter-store is still decided by `Matcher::match_rule_supported_vector()` like other operations. It return `false` here just because arm doesn't support any vector operations. Assume if it want to support a vector gather/scatter, the index input must not be a vector, right?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2328999842
More information about the hotspot-compiler-dev
mailing list