public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@gmail.com>
To: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
Cc: "pan2.li" <pan2.li@intel.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	 Robin Dapp <rdapp.gcc@gmail.com>,
	jeffreyalaw <jeffreyalaw@gmail.com>,
	 "yanzhang.wang" <yanzhang.wang@intel.com>
Subject: Re: [PATCH v1] RISC-V: Use FRM_DYN when add the rounding mode operand
Date: Wed, 5 Jul 2023 15:16:00 +0800	[thread overview]
Message-ID: <CA+yXCZD7tcxQy7aHzoagHfqbn3wzO7xZ17_RGrQL9uyUEeTBEg@mail.gmail.com> (raw)
In-Reply-To: <23C7F4D8D023AB9F+2023070510075109840069@rivai.ai>

LGTM

On Wed, Jul 5, 2023 at 10:08 AM juzhe.zhong@rivai.ai
<juzhe.zhong@rivai.ai> wrote:
>
> LGTM.
>
>
>
> juzhe.zhong@rivai.ai
>
> From: pan2.li
> Date: 2023-07-04 20:26
> To: gcc-patches
> CC: juzhe.zhong; rdapp.gcc; jeffreyalaw; pan2.li; yanzhang.wang; kito.cheng
> Subject: [PATCH v1] RISC-V: Use FRM_DYN when add the rounding mode operand
> From: Pan Li <pan2.li@intel.com>
>
> This patch would like to take FRM_DYN const rtx as the rounding mode
> operand according to the RVV spec, which takes the dyn as the only
> rounding mode for floating-point.
>
> Signed-off-by: Pan Li <pan2.li@intel.com>
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vector-builtins.cc
> (function_expander::use_exact_insn): Use FRM_DYN instead of const0.
> ---
> gcc/config/riscv/riscv-vector-builtins.cc | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc
> index 648c765a5d1..3a53b56effa 100644
> --- a/gcc/config/riscv/riscv-vector-builtins.cc
> +++ b/gcc/config/riscv/riscv-vector-builtins.cc
> @@ -3569,11 +3569,10 @@ function_expander::use_exact_insn (insn_code icode)
>    if (base->has_rounding_mode_operand_p ())
>      add_input_operand (call_expr_nargs (exp) - 2);
> -  /* TODO: Currently, we don't support intrinsic that is modeling rounding mode.
> -     We add default rounding mode for the intrinsics that didn't model rounding
> -     mode yet.  */
> +  /* The RVV floating-point only support dynamic rounding mode in the
> +     FRM register.  */
>    if (opno != insn_data[icode].n_generator_args)
> -    add_input_operand (Pmode, const0_rtx);
> +    add_input_operand (Pmode, gen_int_mode (riscv_vector::FRM_DYN, Pmode));
>    return generate_insn (icode);
> }
> --
> 2.34.1
>
>

  reply	other threads:[~2023-07-05  7:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 12:26 pan2.li
2023-07-04 12:54 ` Robin Dapp
2023-07-05  2:07 ` juzhe.zhong
2023-07-05  7:16   ` Kito Cheng [this message]
2023-07-05 14:27     ` Li, Pan2

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+yXCZD7tcxQy7aHzoagHfqbn3wzO7xZ17_RGrQL9uyUEeTBEg@mail.gmail.com \
    --to=kito.cheng@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=pan2.li@intel.com \
    --cc=rdapp.gcc@gmail.com \
    --cc=yanzhang.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).