[vectorIntrinsics] RFR: 8261108: Add cast nodes from integer types to float types implementation for Arm SVE

Ningsheng Jian njian at openjdk.java.net
Thu Feb 18 03:30:58 UTC 2021


On Tue, 9 Feb 2021 02:15:02 GMT, Wang Huang <whuang at openjdk.org> wrote:

> Add the backend codegen for nodes like castb2f / castb2d / casts2f / casts2d / casti2f / casti2d / castl2f / castl2d.
> 
> * add `sve_scvtf`  ( and `sve_ucvtf`) encoding
> * add mock for these instructions
> * add `VECTOR_CAST_I2F_EXTEND[N]` and `VECTOR_CAST_I2F`
> 
> Thank you for your review.

src/hotspot/cpu/aarch64/assembler_aarch64.hpp line 3356:

> 3354: #undef INSN
> 3355: 
> 3356:   void encode_cvtf_T (SIMD_RegVariant& T_dst, SIMD_RegVariant& T_src) {

It's better to be a non-public function.

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

> 1632: %}')dnl
> 1633: dnl             $1 $2 $3       $4 $5 $6 $7
> 1634: VECTOR_CAST_I2F_EXTEND3(B, D, sunpklo, H, S, D, scvtf)

Can you please align the comment $1...$7 to the arguments?

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

> 1622:             "sve_$3  $dst, $5, $dst\n\t"
> 1623:             "sve_$3  $dst, $6, $dst\n\t"
> 1624:             "sve_$6  $dst, $7, $dst, $7\t# convert $1 to $2 vector" %}

sve_$7 instead?

src/hotspot/cpu/aarch64/assembler_aarch64.hpp line 3385:

> 3383: 
> 3384:   INSN(sve_scvtf, 0b0);
> 3385:   INSN(sve_ucvtf, 0b1);

Is there any usage for ucvtf?

src/hotspot/cpu/aarch64/aarch64_sve.ad line 2728:

> 2726:             n->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
> 2727:   match(Set dst (VectorCastB2X src));
> 2728:   effect(TEMP_DEF dst);

This effect looks unnecessary to me.

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

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


More information about the panama-dev mailing list