> So in the expand method, you added a case for OP_TYPE_vx. 

Actually this patch doesn't add a case OP_TYPE_vx, there are two classes 
binop_frm and binop before this patch.
Binop_frm doesn't have OP_TYPE_vx while binop has OP_TYPE_vx. When delete the 
whole binop_frm, the git diff demo
It looks like add a case OP_TYPE_vx but actually not.

As Jeff pre-approved, will commit the v2 (add gcc_assert suggested by kito) 
around the end of this week if no more comments.

Pan

-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel....@gcc.gnu.org> On Behalf 
Of Li, Pan2 via Gcc-patches
Sent: Tuesday, August 22, 2023 8:10 AM
To: Kito Cheng <kito.ch...@gmail.com>; Jeff Law <jeffreya...@gmail.com>
Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang 
<yanzhang.w...@intel.com>
Subject: RE: [PATCH v1] RISC-V: Refactor RVV class by frm_op_type template arg

Thanks Kito and Jeff for comments, will double check and address the comment in 
v2.

Pan

-----Original Message-----
From: Kito Cheng <kito.ch...@gmail.com> 
Sent: Monday, August 21, 2023 11:07 PM
To: Jeff Law <jeffreya...@gmail.com>
Cc: Li, Pan2 <pan2...@intel.com>; gcc-patches@gcc.gnu.org; 
juzhe.zh...@rivai.ai; Wang, Yanzhang <yanzhang.w...@intel.com>
Subject: Re: [PATCH v1] RISC-V: Refactor RVV class by frm_op_type template arg

Just one nit from me: plz add assertion to OP_TYPE_vx to make sure NO
FRM_OP == HAS_FRM there

On Mon, Aug 21, 2023 at 11:04 PM Jeff Law via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
>
> On 8/17/23 20:53, Pan Li via Gcc-patches wrote:
> > From: Pan Li <pan2...@intel.com>
> >
> > As suggested by kito, we will add new frm_opt_type template arg
> > to the op class, to avoid the duplicated function expand.
> >
> > Signed-off-by: Pan Li <pan2...@intel.com>
> >
> > gcc/ChangeLog:
> >
> >       * config/riscv/riscv-vector-builtins-bases.cc
> >       (class binop_frm): Removed.
> >       (class reverse_binop_frm): Ditto.
> >       (class widen_binop_frm): Ditto.
> >       (class vfmacc_frm): Ditto.
> >       (class vfnmacc_frm): Ditto.
> >       (class vfmsac_frm): Ditto.
> >       (class vfnmsac_frm): Ditto.
> >       (class vfmadd_frm): Ditto.
> >       (class vfnmadd_frm): Ditto.
> >       (class vfmsub_frm): Ditto.
> >       (class vfnmsub_frm): Ditto.
> >       (class vfwmacc_frm): Ditto.
> >       (class vfwnmacc_frm): Ditto.
> >       (class vfwmsac_frm): Ditto.
> >       (class vfwnmsac_frm): Ditto.
> >       (class unop_frm): Ditto.
> >       (class vfrec7_frm): Ditto.
> >       (class binop): Add frm_op_type template arg.
> >       (class unop): Ditto.
> >       (class widen_binop): Ditto.
> >       (class widen_binop_fp): Ditto.
> >       (class reverse_binop): Ditto.
> >       (class vfmacc): Ditto.
> >       (class vfnmsac): Ditto.
> >       (class vfmadd): Ditto.
> >       (class vfnmsub): Ditto.
> >       (class vfnmacc): Ditto.
> >       (class vfmsac): Ditto.
> >       (class vfnmadd): Ditto.
> >       (class vfmsub): Ditto.
> >       (class vfwmacc): Ditto.
> >       (class vfwnmacc): Ditto.
> >       (class vfwmsac): Ditto.
> >       (class vfwnmsac): Ditto.
> >       (class float_misc): Ditto.
> So in the expand method, you added a case for OP_TYPE_vx.  I assume that
> was intentional -- but it's not mentioned anywhere in the ChangeLog.  So
> please update the ChangeLog if it was intentional or remove the change
> if it wasn't intentional.  Pre-approved with whichever change is
> appropriate.
>
> Thanks,
> Jeff

Reply via email to