> Right now it looks like plus/minus don't need to be different tests > (and mult won't need to be either I presume)? While I'm not against adding > individual tests for now I'd prefer us to consolidate them where possible in > the long term. Is that in your plans?
I think we need the run tests for each op combine up to a point. But for asm check, Seems we can put it together? I mean something like below: +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d --param=gpr2vr-cost=0" } */ + +#include "vx_binary.h" + +DEF_VX_BINARY_CASE_0(int32_t, +) +DEF_VX_BINARY_CASE_0(int32_t, -) + +/* { dg-final { scan-assembler-times {vadd.vx} 1 } } */ +/* { dg-final { scan-assembler-times {vsub.vx} 1 } } */ If that is ok, I will start with this series. Pan -----Original Message----- From: Robin Dapp <rdapp....@gmail.com> Sent: Monday, May 12, 2025 4:24 PM To: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp....@gmail.com; Chen, Ken <ken.c...@intel.com>; Liu, Hongtao <hongtao....@intel.com>; Robin Dapp <rdapp....@gmail.com> Subject: Re: [PATCH v1 0/7] RISC-V: Combine vec_duplicate + vsub.vv to vsub.vx on GR2VR cost > This patch would like to introduce the combine of vec_dup + vsub.vv into > vsub.vx on the cost value of GR2VR. The late-combine will take place if > the cost of GR2VR is zero, or reject the combine if non-zero like 1, 15 > in test. There will be two cases for the combine: The changes to add are very mechanical so I'd think they're OK (once the CI is happy). Right now it looks like plus/minus don't need to be different tests (and mult won't need to be either I presume)? While I'm not against adding individual tests for now I'd prefer us to consolidate them where possible in the long term. Is that in your plans? -- Regards Robin