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,
>
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];
> }
> }
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