Re: Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-06 Thread juzhe.zh...@rivai.ai
To make sure we won't break and cause ICE. Committed soon. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-06-07 10:38 To: juzhe.zh...@rivai.ai CC: gcc-patches; Kito.cheng; palmer; palmer; jeffreyalaw; Robin Dapp; pan2.li Subject: Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorizatio

Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-06 Thread Kito Cheng via Gcc-patches
LT, builder.mode ()), > + RVV_BINOP, mul_ops); > + > + /* Step 6: Generate the final result. */ > + rtx add_ops[] = {target, base, adjusted_step}; > + emit_vlmax_insn (code_for_pred (PLUS, builder.mode ()), RVV_BINOP, > +

Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-06 Thread juzhe.zh...@rivai.ai
Ping this patch. Ok for trunk ? Since following patches are blocked by this. juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-06-06 12:16 To: gcc-patches CC: kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc; pan2.li; Juzhe-Zhong Subject: [PATCH] RISC-V: Support RVV VLA SLP

[PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-06 Thread juzhe . zhong
From: Juzhe-Zhong This patch enables basic VLA SLP auto-vectorization. Consider this following case: void f (uint8_t *restrict a, uint8_t *restrict b) { for (int i = 0; i < 100; ++i) { a[i * 8 + 0] = b[i * 8 + 7] + 1; a[i * 8 + 1] = b[i * 8 + 7] + 2; a[i * 8 + 2] = b[i * 8

Re: Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-06 Thread juzhe.zh...@rivai.ai
addiw a5,a5,3 > sb a5,799(a0) > ret Ideally, this scalar codes should be able to vectorized like aarch64. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-06-06 14:55 To: juzhe.zhong CC: gcc-patches; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rd

Re: [PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-05 Thread Richard Biener via Gcc-patches
On Tue, Jun 6, 2023 at 6:17 AM wrote: > > From: Juzhe-Zhong > > This patch enables basic VLA SLP auto-vectorization. > Consider this following case: > void > f (uint8_t *restrict a, uint8_t *restrict b) > { > for (int i = 0; i < 100; ++i) > { > a[i * 8 + 0] = b[i * 8 + 7] + 1; >

[PATCH] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-05 Thread juzhe . zhong
From: Juzhe-Zhong This patch enables basic VLA SLP auto-vectorization. Consider this following case: void f (uint8_t *restrict a, uint8_t *restrict b) { for (int i = 0; i < 100; ++i) { a[i * 8 + 0] = b[i * 8 + 7] + 1; a[i * 8 + 1] = b[i * 8 + 7] + 2; a[i * 8 + 2] = b[i * 8