Re: [PATCH V2] RISC-V: Enable basic VLS auto-vectorization

2023-07-30 Thread Robin Dapp via Gcc-patches
> +;; - > +;; Duplicate Operations > +;; - > + > +(define_insn_and_split "@vec_duplicate" > + [(set (match_operand:VLS 0 "register_operand") > +(vec_duplicat

RE: [PATCH V2] RISC-V: Enable basic VLS auto-vectorization

2023-07-30 Thread Li, Pan2 via Gcc-patches
: Enable basic VLS auto-vectorization LGTM, thanks :) On Mon, Jul 31, 2023 at 10:14 AM Juzhe-Zhong wrote: > > Consider this following case: > void > foo (int8_t *in, int8_t *out, int8_t x) > { > for (int i = 0; i < 16; i++) > in[i] = x; > } > > Comp

Re: [PATCH V2] RISC-V: Enable basic VLS auto-vectorization

2023-07-30 Thread Kito Cheng via Gcc-patches
LGTM, thanks :) On Mon, Jul 31, 2023 at 10:14 AM Juzhe-Zhong wrote: > > Consider this following case: > void > foo (int8_t *in, int8_t *out, int8_t x) > { > for (int i = 0; i < 16; i++) > in[i] = x; > } > > Compile option: --param=riscv-autovec-preference=scalable -fno-builtin > > Before th

[PATCH V2] RISC-V: Enable basic VLS auto-vectorization

2023-07-30 Thread Juzhe-Zhong
Consider this following case: void foo (int8_t *in, int8_t *out, int8_t x) { for (int i = 0; i < 16; i++) in[i] = x; } Compile option: --param=riscv-autovec-preference=scalable -fno-builtin Before this patch: foo: li a5,16 csrra4,vlenb vsetvli a3,zero,e8,m1