RE: [PATCH v1] RISC-V: Refine bswap16 auto vectorization code gen

2023-10-09 Thread Li, Pan2
Sure thing, will send V2 for this change. Pan From: juzhe.zh...@rivai.ai Sent: Monday, October 9, 2023 5:04 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Refine bswap16 auto vectorization code gen Remove these functions: +static

Re: [PATCH v1] RISC-V: Refine bswap16 auto vectorization code gen

2023-10-09 Thread juzhe.zh...@rivai.ai
From: pan2.li Date: 2023-10-09 16:51 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Refine bswap16 auto vectorization code gen From: Pan Li This patch would like to refine the code gen for the bswap16. We will have VEC_PERM_EXPR after rtl expand

[PATCH v1] RISC-V: Refine bswap16 auto vectorization code gen

2023-10-09 Thread pan2 . li
From: Pan Li This patch would like to refine the code gen for the bswap16. We will have VEC_PERM_EXPR after rtl expand when invoking __builtin_bswap. It will generate about 9 instructions in loop as below, no matter it is bswap16, bswap32 or bswap64. .L2: 1 vle16.v v4,0(a0) 2 vmv.v.x v2,a7 3