RFR: 8277426: Optimize mask reduction operations on x86 [v2]
Jie Fu
jiefu at openjdk.java.net
Wed Nov 24 03:55:06 UTC 2021
On Fri, 19 Nov 2021 11:43:16 GMT, Mai Đặng Quân Anh <duke at openjdk.java.net> wrote:
>> Hi,
>>
>> This patch improves the performance of mask reduction operations on AVX by matching the pattern `VectorMaskReduction (VectorStoreMask mask)` to eliminate the extra `VectorStoreMaskNode`. I have also done some refactoring to unify the logic of `toLong` with the other reduction operations.
>>
>> The patch has been discussed partially in [panama-vector repository](https://github.com/openjdk/panama-vector/pull/158).
>>
>> Thank you very much.
>
> Mai Đặng Quân Anh has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'master' into vectorMaskReduction
> - reduce some dependencies with spare register
> - improve mask reduction logic on AVX
src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4065:
> 4063: void C2_MacroAssembler::vector_mask_operation(int opc, Register dst, KRegister mask,
> 4064: int masklen, int masksize, int vec_enc) {
> 4065: assert(VM_Version::supports_popcnt() &&
New instructions like `lzcntq` and `tzcntq` are used for the optimized code gen without detecting the availability.
I'm a bit worried about that.
So do all AVX512 platforms support them?
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6447
More information about the hotspot-compiler-dev
mailing list