[vectorIntrinsics] Integrated: 8278468: AArch64: [vectorapi] SVE backend support for CompressM and CompressV(B/H)

Eric Liu eliu at openjdk.java.net
Thu Dec 30 14:16:42 UTC 2021


On Tue, 28 Dec 2021 14:00:08 GMT, Eric Liu <eliu at openjdk.org> wrote:

> This patch adds the backend rules for CompressM and CompressV on BYTE
> and SHORT types. The basic idea is to use SVE compact instruction which
> supports INT type. The general process for vector compression is as
> below:
> 
> 1. Split and extend the vector into INT type.
> 2. Compresse the extended vectors by COMPACT(S) and narrow the
>    results back to original type.
> 3. Merge the results by concatenating the compressed elements together.
> 
> The generated code by "ShortVector.compress" is as follows:
> 
> 
>         mov       z19.h, #0
>         sunpklo   z17.s, z16.h
>         punpklo   p0.h, p1.b
>         compact   z17.s, p0, z17.s
>         uzp1      z17.h, z17.h, z19.h
>         cntp      x8, p7, p0.s
>         punpkhi   p0.h, p1.b
>         sunpkhi   z18.s, z16.h
>         compact   z18.s, p0, z18.s
>         uzp1      z18.h, z18.h, z19.h
>         neg       x8, x8
>         index     z19.h, w8, #1
>         tbl       z18.h, {z18.h}, z19.h
>         orr       z17.d, z17.d, z18.d
> 
> 
> The performance has a significant improvement in my test machines.

This pull request has now been integrated.

Changeset: bf5e00d9
Author:    Eric Liu <eliu at openjdk.org>
URL:       https://git.openjdk.java.net/panama-vector/commit/bf5e00d9fd20a17106e7b3615c22b5cbe20b031d
Stats:     276 lines in 8 files changed: 245 ins; 4 del; 27 mod

8278468: AArch64: [vectorapi] SVE backend support for CompressM and CompressV(B/H)

Reviewed-by: njian

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

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


More information about the panama-dev mailing list