RFR: 8318650: Optimized subword gather for x86 targets. [v2]
Jatin Bhateja
jbhateja at openjdk.org
Sun Oct 29 22:25:29 UTC 2023
On Fri, 27 Oct 2023 08:04:47 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> For x86 backend implementation we emit a gather loop hence index species is not used for sub-word, I am performing the index out of bound in a loop which operate a max integer vector granularity supported by target.
>> https://github.com/openjdk/jdk/pull/16354/files#diff-13cc2d6ec18e487ddae05cda671bdb6bb7ffd42ff7bc51a2e00c8c5e622bd55dR3641
>>
>> Because there is cap on max integral vector size, thus for targets supporting direct sub-word gather instruction will have to emit an instruction sequence comprising of partial indexMap loads into integral vectors and issue multiple gather operations.
>
> I see, thanks for the explanation! It's different from SVE, which the index should be an int vector with the same length of the target vector. We have to generate the index vectors. So the array length check to the given index map is necessary in java side.
Intrinsic still receive the indexArray and corresponding species with matching lane count OR maximally supported integral species otherwise. Due to lane size differences b/w sub-word and integer it may never be possible to have compatible species.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16354#discussion_r1375524154
More information about the hotspot-compiler-dev
mailing list