RFR: 8351623: VectorAPI: Add SVE implementation of subword gather load operation [v6]
Xiaohong Gong
xgong at openjdk.org
Mon Sep 22 02:24:16 UTC 2025
On Thu, 18 Sep 2025 12:19:51 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/matcher_aarch64.hpp line 173:
>>
>>> 171: // SVE requires vector indices for gather-load/scatter-store operations on all
>>> 172: // data types.
>>> 173: static bool gather_scatter_requires_index_in_address(BasicType bt) {
>>
>> I know I agreed to this naming, but I looked at the signature of `Gather` again:
>> `LoadVectorGatherNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, Node* indices)`
>>
>> I'm a little confused now what is the `address` that your name references. Is it the `adr`? I think not, because that is the base address, right? Can you clarify a little more? Maybe add to the documentation of the gather and scatter node as well, if you think that helps?
>
> Actually, you already did add documentation to the gather / scatter nodes now. And based on your explanation there, I suggest you rename the method here to:
> `gather_scatter_requires_indices_from_array`
> This would say that the indices come from an array, rather than a vector register.
>
> Your current name we had agreed on confuses me because it suggests that the index maybe already in the address `adr`, but that does not make much sense.
Ok, `gather_scatter_requires_indices_from_array` sounds better to me. I will change it soon.
>I'm a little confused now what is the address that your name references. Is it the adr? I think not, because that is the base address, right? Can you clarify a little more? Maybe add to the documentation of the gather and scatter node as well, if you think that helps?
It means the input `indices` is an address that saves the indexes if this method return true, otherwise, `indices` is a vector register. You are right that it has no relationship with `adr` input which is the memory base address.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2366559782
More information about the hotspot-compiler-dev
mailing list