RE: RE:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread Demin Han
OK, I will solve the comparison operation first and then do some check over other operations. Regards, Demin From: juzhe.zh...@rivai.ai Sent: 2024年3月5日 17:02 To: Demin Han ; gcc-patches Cc: kito.cheng ; pan2.li ; jeffreyalaw ; Robin Dapp ; richard.sandiford Subject: Re: RE:[PATCH 3/5]

Re: RE:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread juzhe.zh...@rivai.ai
Yes. I think we are lacking some combine patterns to do all vector-scalar combinations. If you are interested at this topic, you can do some investigations on that (I believe currently no body works on it for now). I bet we should add some patterns for late-combine PASS for example: (set (plus

RE: Re:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-05 Thread Demin Han
Hi, I applied the mentioned last_combine patch(https://patchwork.ozlabs.org/project/gcc/patch/mptbka7em9w@arm.com/). And did some initial tests. Found that: 1. Float vector-scalar and vector-imm are OK 2. Integer vector-scalar is OK 3. Integer vector-imm(e.g. a[i] > 16) is

RE: Re:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-03-01 Thread Demin Han
Hi juzhe, Yes, for comparison between vector and scalar variable, this patch is not work, because the scalar is duplicated in loop vectorize pass. I have not found idea for this situation, so solve vector-imm comparison first. Thanks for remind this, I will try that patch. Thanks. From: 钟居哲

Re:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm

2024-02-29 Thread 钟居哲
Hi, han. I understand you are trying to support optimize vector-splat_vector into vector-scalar in "expand" stage, that is, vv - vx or vv - vf. It's a known issue that we know for a long time. This patch is trying to transform vv-vf when the splat vector is duplicate from a constant (by