public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Li, Pan2" <pan2.li@intel.com>
To: "Kito Cheng" <kito.cheng@gmail.com>, 钟居哲 <juzhe.zhong@rivai.ai>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"Wang, Yanzhang" <yanzhang.wang@intel.com>
Subject: RE: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API
Date: Mon, 14 Aug 2023 14:47:48 +0000	[thread overview]
Message-ID: <MW5PR11MB590866CFCCB8C45DB55BB25DA917A@MW5PR11MB5908.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CA+yXCZDBZ5oideRa5dYP4aYynfj5phUVGeZcv0A1okii-d6Lxg@mail.gmail.com>

Thanks Kito for comments, updated in PATCH v2.

https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627367.html

Pan

-----Original Message-----
From: Kito Cheng <kito.cheng@gmail.com> 
Sent: Monday, August 14, 2023 10:07 PM
To: 钟居哲 <juzhe.zhong@rivai.ai>
Cc: Li, Pan2 <pan2.li@intel.com>; gcc-patches <gcc-patches@gcc.gnu.org>; Wang, Yanzhang <yanzhang.wang@intel.com>
Subject: Re: [PATCH v1] RISC-V: Support RVV VFREC7 rounding mode intrinsic API

> +template<int UNSPEC>

You don't need a template class here since it can only be UNSPEC_VFREC7.

> +class vfrec7_frm : public function_base
> +{
> +public:
> +  bool has_rounding_mode_operand_p () const override { return true; }
> +
> +  rtx expand (function_expander &e) const override
> +  {
> +    return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
> +  }
> +};
> +
> /* Implements vrsub.  */
> class vrsub : public function_base
> {
> @@ -2433,6 +2448,7 @@ static CONSTEXPR const unop<SQRT> vfsqrt_obj;
> static CONSTEXPR const unop_frm<SQRT> vfsqrt_frm_obj;
> static CONSTEXPR const float_misc<UNSPEC_VFRSQRT7> vfrsqrt7_obj;
> static CONSTEXPR const float_misc<UNSPEC_VFREC7> vfrec7_obj;
> +static CONSTEXPR const vfrec7_frm<UNSPEC_VFREC7> vfrec7_frm_obj;

Then `static CONSTEXPR const vfrec7_frm vfrec7_frm_obj;` here

> static CONSTEXPR const binop<SMIN> vfmin_obj;
> static CONSTEXPR const binop<SMAX> vfmax_obj;
> static CONSTEXPR const float_misc<UNSPEC_VCOPYSIGN> vfsgnj_obj;

  reply	other threads:[~2023-08-14 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 12:49 pan2.li
2023-08-14 13:26 ` 钟居哲
2023-08-14 14:07   ` Kito Cheng
2023-08-14 14:47     ` Li, Pan2 [this message]
2023-08-14 15:02       ` Kito Cheng
2023-08-15  1:02         ` Li, Pan2
2023-08-14 14:46 ` [PATCH v2] " pan2.li

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=MW5PR11MB590866CFCCB8C45DB55BB25DA917A@MW5PR11MB5908.namprd11.prod.outlook.com \
    --to=pan2.li@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@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).