RE: Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-12 Thread Li, Pan2 via Gcc-patches
; jeffreyalaw ; Robin Dapp Subject: Re: Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization Yes, change all define_insn_and_split to that style, "TARGET_VECTOR && can_create_pseudo_p ()"/ "&& 1", my understanding is all those patterns

Re: Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-12 Thread Kito Cheng via Gcc-patches
ot;)))] > "TARGET_VECTOR && can_create_pseudo_p ()" > "#" > "&& 1" > [(const_int 0)] > > ____________ > juzhe.zh...@rivai.ai > > > From: Kito Cheng > Date: 2023-06-12 20:37 > To

Re: Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-12 Thread juzhe.zh...@rivai.ai
t 0)] juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-06-12 20:37 To: juzhe.zh...@rivai.ai CC: gcc-patches; Kito.cheng; palmer; palmer; jeffreyalaw; Robin Dapp Subject: Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization We have two style predictor for thos

Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-12 Thread Kito Cheng via Gcc-patches
d patch to fix all those issues. On Mon, Jun 12, 2023 at 8:27 PM juzhe.zh...@rivai.ai wrote: > > Is this patch ok for trunk? > > > > juzhe.zh...@rivai.ai > > From: juzhe.zhong > Date: 2023-06-12 10:41 > To: gcc-patches > CC: kito.cheng; kito.cheng; palmer; palmer; je

Re: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-12 Thread juzhe.zh...@rivai.ai
Is this patch ok for trunk? juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-06-12 10:41 To: gcc-patches CC: kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc; Juzhe-Zhong Subject: [PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization From: Juzhe-Zhong

[PATCH] RISC-V: Add RVV narrow shift right lowering auto-vectorization

2023-06-11 Thread juzhe . zhong
From: Juzhe-Zhong Optimize the following auto-vectorization codes: void foo (int16_t * __restrict a, int32_t * __restrict b, int32_t c, int n) { for (int i = 0; i < n; i++) a[i] = b[i] >> c; } Before this patch: foo: ble a3,zero,.L5 .L3: vsetvli a5,a3,e32,m1,ta,ma