RE: [PATCH] RISC-V: Enable select_vl for RVV auto-vectorization

2023-06-09 Thread Li, Pan2 via Gcc-patches
Subject: Re: [PATCH] RISC-V: Enable select_vl for RVV auto-vectorization LGTM, thanks for this On Sat, Jun 10, 2023 at 8:42 AM wrote: > > From: Juzhe-Zhong > > Consider this following example: > void vec_add(int32_t *restrict c, int32_t *restrict a, int32_t *restrict b, >

Re: [PATCH] RISC-V: Enable select_vl for RVV auto-vectorization

2023-06-09 Thread Kito Cheng via Gcc-patches
LGTM, thanks for this On Sat, Jun 10, 2023 at 8:42 AM wrote: > > From: Juzhe-Zhong > > Consider this following example: > void vec_add(int32_t *restrict c, int32_t *restrict a, int32_t *restrict b, > int N) { > for (long i = 0; i < N; i++) { > c[i] = a[i] + b[i]; > } > }

[PATCH] RISC-V: Enable select_vl for RVV auto-vectorization

2023-06-09 Thread juzhe . zhong
From: Juzhe-Zhong Consider this following example: void vec_add(int32_t *restrict c, int32_t *restrict a, int32_t *restrict b, int N) { for (long i = 0; i < N; i++) { c[i] = a[i] + b[i]; } } After this patch: vec_add: ble a3,zero,.L5 .L3: vsetvli a5,a3,e3