RFR: 8351623: VectorAPI: Add SVE implementation of subword gather load operation [v3]

Emanuel Peter epeter at openjdk.org
Wed Sep 17 06:21:35 UTC 2025


On Wed, 17 Sep 2025 02:18:17 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Thanks for all the explanations, that was very helpful!
>> 
>> Can you please adjust the comment so that all the relevant information is there?
>> We could also make the name of the method more precise / informative?
>> Maybe you could write something like this:
>> 
>> // true -> if gather/scatter supported: require index in vector register
>> // false -> if gather/scatter supported: allows both index in vector register AND array address holding indices
>> 
>> Then give more information about platform specific things that you mentioned about aarch64 and x86 in the relevant files ;)
>
> Hi @eme64 , regarding to the method name, is `gather_scatter_requires_index_in_vector()` fine to you? If so, I think I can change the name to it. Or please let me know if you have a better one. Thanks!
> 
> BTW, do you think it's better if I reverse the function of this method, such as `gather_scatter_requires_index_in_addr()`. Because gather/scatter is a vector operation. By default, accepting a  vector input usually make sense. And this is true for all word and double-word types. The subword type loading which requires the indexes saved in an address on X86 is a corner case to me.

If I understood right, some platforms only support addr, some only index, right? Are there any that support both? You could also have 2 methods, that say `allows` or maybe more idiomatically for hotspot C2 `implements / implemented`. Yet another alternative: `enum` with the different states.

These are just some ideas. But from what you are telling me, it would really make sense to go with `gather_scatter_requires_index_in_addr`, since the addr case is indeed a corner-case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26236#discussion_r2354427486


More information about the hotspot-compiler-dev mailing list