[vectorIntrinsics] RFR: 8258072: Add Reinterpret nodes implementation for Arm SVE
Xiaohong Gong
xgong at openjdk.java.net
Wed Jan 6 07:11:04 UTC 2021
On Wed, 6 Jan 2021 03:32:45 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
>> Add reduction nodes support for Arm SVE. Add the backend codegen for node like "VectorReinterpret" .
>> In this patch, We implement these instructs:
>> * reinterpret (src == dst)
>> * reinterpretExpand (src < dst)
>> * reinterpretShrink (src > dst)
>> At the same time, we fix a bug (JDK-8258989) because it is not merged in panama-vector/vectorIntrinsics.
>
> src/hotspot/cpu/aarch64/aarch64_sve.ad line 384:
>
>> 382: zr, as_Register($tmp$$reg));
>> 383: __ sve_cpy(as_FloatRegister($dst$$reg), __ B,
>> 384: as_PRegister($pTmp$$reg), as_FloatRegister($src$$reg));
>
> It seems using `cpy` is not right here, which usually accept a `imm, scalar or SIMD&FP scalar register`. This instruction is expected to copy the scalar value to each active element. So use `"mov"` instead ? BTW, the normal `MOV <Zd>.<T>, <Pg>/M, <Zn>.<T>` instruction uses the `merging` feature of predicate while not `zeroing`. To make sure the non active elements are zero, do you think it's better to use `MOVS <Pd>.B, <Pg>/Z, <Pn>.B` here?
I'm sorry that I didn't notice this is an instruction for predicate `MOVS <Pd>.B, <Pg>/Z, <Pn>.B`. So please ignore this suggestion. Thanks!
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/30
More information about the panama-dev
mailing list