[vectorIntrinsics] RFR: 8283145: [vector] Add the compiler IR and aarch64 support for count leading and trailing zeros

Ningsheng Jian njian at openjdk.java.net
Thu Mar 17 05:47:02 UTC 2022


On Thu, 17 Mar 2022 02:22:09 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

> This patch adds the hotspot compiler implementations for the vector operations of count leading and trailing zeros. It adds:
>  - two vector nodes respectively for the two vector operations
>  - the backend implementations for aarch64 NEON and SVE

src/hotspot/cpu/aarch64/aarch64_neon_ad.m4 line 2564:

> 2562: CLTZ_I(LeadingZerosV, D, 8B/4H/2S)
> 2563: CLTZ_I(LeadingZerosV, X, 16B/8H/4S)
> 2564: CLTZ_L(LeadingZerosV, 6)

Merge these two rules?

src/hotspot/cpu/aarch64/aarch64_sve_ad.m4 line 3327:

> 3325: instruct count$1_masked(vReg dst_src, pRegGov pg) %{
> 3326:   predicate(UseSVE > 0);
> 3327:   match(Set dst_src (Count$1 dst_src pg));

Can you please add comment about why dst and src are the same?

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

PR: https://git.openjdk.java.net/panama-vector/pull/180


More information about the panama-dev mailing list