[vectorIntrinsics] RFR: 8285013: AArch64: [vectorapi] Backend support of ExpandV for SVE2

Ningsheng Jian njian at openjdk.java.net
Thu Apr 28 03:44:59 UTC 2022


On Thu, 28 Apr 2022 03:09:25 GMT, Eric Liu <eliu at openjdk.org> wrote:

> This patch adds the backend for Vector.expand(mask).
> 
> The basic idea is to use TBL which can shuffle the elements in the given
> vector flexibly. HISTCNT is used to generate the second source input for
> TBL whose value is used to select the indexed element from src vector.
> 
> The final code for an int vector is generated as below:
> 
> 
>    mov z17.s, #0
>    histcnt z17.s, p0/z, z17.s, z17.s
>    sub z17.s, z17.s, #1
>    tbl z17.s, {z16.s}, z17.s
> 
> 
> As the HISTCNT instruction only supports element in size of 32/64 bits,
> expanding of subword type is missing now.

Nice solution! I will run tests.

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

Marked as reviewed by njian (Committer).

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


More information about the panama-dev mailing list