RFR: 8282711: Accelerate Math.signum function for AVX and AVX512 target. [v6]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Wed Apr 13 21:07:18 UTC 2022
On Wed, 13 Apr 2022 18:53:18 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits:
>>
>> - 8282711: Review comments resolutions.
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8282711
>> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8282711
>> - 8282711: Replacing vector length based predicate.
>> - 8282711: Making the changes more generic (removing AVX512DQ restriction), adding new IR level test.
>> - 8282711: Review comments resolved.
>> - 8282711: Accelerate Math.signum function for AVX and AVX512 target.
>
> src/hotspot/cpu/x86/x86.ad line 6114:
>
>> 6112:
>> 6113: instruct signumV_reg_evex(vec dst, vec src, vec zero, vec one, kReg ktmp1) %{
>> 6114: predicate(Matcher::vector_length_in_bytes(n) == 64);
>
> avx512vl check is needed here. vector_signum_evex needs avx512vl support.
Further clarification here: The vector_signum_evex code is faster than vector_signum_vex. On AVX=3 platforms vector_signum_evex should be used for all vector lengths.
So the predicate for signumV_reg_evex should be:
((VM_Version::supports_avx512vl()) || (Matcher::vector_length_in_bytes(n) == 64))
Accordingly the predicate for signumV_reg_avx should be adjusted to be reverse of this.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7717
More information about the hotspot-compiler-dev
mailing list