RE: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-09 Thread Li, Pan2 via Gcc-patches
...@rivai.ai; jeffreya...@gmail.com; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic Yeah, no further comment from me :) On Thu, Aug 10, 2023 at 10:16 AM Li, Pan2 wrote: > > Thanks kito. It makes sense, should not reach default, may I p

Re: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-09 Thread Kito Cheng via Gcc-patches
Cheng > Sent: Thursday, August 10, 2023 10:12 AM > To: Li, Pan2 > Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; jeffreya...@gmail.com; > Wang, Yanzhang ; Kito Cheng > Subject: Re: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode > intrinsic > > >

RE: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-09 Thread Li, Pan2 via Gcc-patches
...@gmail.com; Wang, Yanzhang ; Kito Cheng Subject: Re: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic > +/* Get the frm mode with given CONST_INT rtx, the default mode is > + FRM_DYN. */ > +enum floating_point_rounding_mode > +get_frm_mode

Re: [PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-09 Thread Kito Cheng via Gcc-patches
> +/* Get the frm mode with given CONST_INT rtx, the default mode is > + FRM_DYN. */ > +enum floating_point_rounding_mode > +get_frm_mode (rtx operand) > +{ > + gcc_assert (CONST_INT_P (operand)); > + > + switch (INTVAL (operand)) > +{ > +case FRM_RNE: > + return FRM_RNE; > +c

[PATCH v2] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-07 Thread Pan Li via Gcc-patches
From: Pan Li The frm_mode attr has some assumptions for each define insn as below. 1. The define insn has at least 9 operands. 2. The operands[9] must be frm reg. 3. The operands[9] must be const int. Actually, the frm operand can be operands[8], operands[9] or operands[10], and not all the def