RFR: 8261542: X86 slice and unslice intrinsics for 256-bit byte/short vectors [v3]
Vladimir Kozlov
kvn at openjdk.java.net
Fri Feb 19 02:07:40 UTC 2021
On Fri, 19 Feb 2021 01:27:57 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Next assert checks <= 16 when code is guarded by (UseAVX == 0). It is not (UseAVX ==2).
>> Also } else { case is for UseAVX > 0 which includes AVX=1 but vpaddb() (avx3) is used there.
>> Seems UseAVX checks wrong here.
>
> The assert checks for vlen_in_bytes <= 16 (128 bits) and so is a correct check for UseAVX=0.
> vpaddb is supported on AVX1/AVX2 as well.
> vpaddb is supported on AVX1 for up to 128 bit and
> on AVX2 for upto 256 bit and
> on AVX3 (512) for upto 512 bit vectors.
> I have tested this for UseAVX=0, UseAVX=1, UseAVX=2, UseAVX=3 platform.
>
> The check is for UseAVX as with any flavor of AVX, we can use less number of instructions to do this operation.
> This is because AVX allows destination to be separate from both the sources.
>
> Please let me know if I am missing something.
My bad - I missed that size is in bytes in assert. The assert is correct, as you said.
And `} else {` part works for AVX1 because of match_rule_supported_vector() bailout 256-bit case.
May be add assert(UseAVX > 1 || vlen_in_bytes <= 16, ).
I only have one question left - about check >= 256 in match_rule_supported_vector()
-------------
PR: https://git.openjdk.java.net/jdk/pull/2520
More information about the hotspot-compiler-dev
mailing list