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

Vladimir Kozlov kvn at openjdk.java.net
Thu Feb 18 23:34:45 UTC 2021


On Thu, 18 Feb 2021 21:21:49 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> src/hotspot/cpu/x86/x86.ad line 7550:
>> 
>>> 7548:     // only byte shuffle instruction available on these platforms
>>> 7549:     int vlen_in_bytes = vector_length_in_bytes(this);
>>> 7550:     if (UseAVX == 0) {
>> 
>> This code will not be executed with vector length 16 because match_rule_supported_vector() bailout with (size_in_bits == 256 && UseAVX < 2).
>
> Yes you are right, but this code will execute for vector length 16 when UseAVX ==2.
>  It will also execure for vector length 16 when UseAVX == 3 &&
> !VM_Version::supports_avx512bw.

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.

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

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


More information about the hotspot-dev mailing list