RFR: 8261542: X86 slice and unslice intrinsics for 256-bit byte/short vectors [v4]

Sandhya Viswanathan sviswanathan at openjdk.java.net
Fri Feb 19 03:20:59 UTC 2021


On Fri, 19 Feb 2021 02:05:02 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> 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()

Added the following assert on else path:
+      assert(UseAVX > 1 || vlen_in_bytes <= 16, "required");

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

PR: https://git.openjdk.java.net/jdk/pull/2520


More information about the hotspot-dev mailing list