OK, I will solve the comparison operation first and then do some check over other operations.
Regards, Demin From: juzhe.zh...@rivai.ai <juzhe.zh...@rivai.ai> Sent: 2024年3月5日 17:02 To: Demin Han <demin....@starfivetech.com>; gcc-patches <gcc-patches@gcc.gnu.org> Cc: kito.cheng <kito.ch...@gmail.com>; pan2.li <pan2...@intel.com>; jeffreyalaw <jeffreya...@gmail.com>; Robin Dapp <rdapp....@gmail.com>; richard.sandiford <richard.sandif...@arm.com> Subject: Re: RE:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm 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 : (vec_duplicate) (reg))) ________________________________ juzhe.zh...@rivai.ai<mailto:juzhe.zh...@rivai.ai> From: Demin Han<mailto:demin....@starfivetech.com> Date: 2024-03-05 16:40 To: 钟居哲<mailto:juzhe.zh...@rivai.ai>; gcc-patches<mailto:gcc-patches@gcc.gnu.org> CC: kito.cheng<mailto:kito.ch...@gmail.com>; Li, Pan2<mailto:pan2...@intel.com>; jeffreyalaw<mailto:jeffreya...@gmail.com>; Robin Dapp<mailto:rdapp....@gmail.com>; richard.sandiford<mailto:richard.sandif...@arm.com> Subject: RE: Re:[PATCH 3/5] RISC-V: Support vmfxx.vf for autovec comparison of vec and imm 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 not OK. When reaches last_combine pass, vec_duplicate(0x10) form is still kept, but no pattern match this now, because all scalar patterns have “register_operand” predication. I think MD file or expand function of rvv need to change for this situation. Regards, Demin