public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Kirill Yukhin <kirill.yukhin@gmail.com>,
	 Hongtao Liu <hongtao.liu@intel.com>
Subject: Re: [PATCH] x86/AVX512: use VMOVDDUP for broadcast to V2DF
Date: Wed, 14 Jun 2023 14:30:03 +0800	[thread overview]
Message-ID: <CAMZc-bx-vGmrhE-gnE1kqgFtjbvCiqJycZSAzbPQo9XbptYTRg@mail.gmail.com> (raw)
In-Reply-To: <1901e956-dc34-cc03-0419-8d4338174384@suse.com>

On Wed, Jun 14, 2023 at 1:55 PM Jan Beulich via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Like is already the case for the AVX/AVX2 form, VMOVDDUP - acting on
> double precision floating values - is more appropriate to use here, and
> it can also result in shorter insn encodings when source is memory or
> %xmm0...%xmm7, and no masking is applied (in allowing a 2-byte VEX
> prefix then instead of a 3-byte one).
>
> gcc/
>
>         * config/i386/sse.md (<avx512>_vec_dup<mode><mask_name>): Use
>         vmovddup.
Ok for trunk.
>
> --- a/gcc/config/i386/sse.md
> +++ b/gcc/config/i386/sse.md
> @@ -25724,9 +25724,9 @@
>    "TARGET_AVX512F"
>  {
>    /*  There is no DF broadcast (in AVX-512*) to 128b register.
> -      Mimic it with integer variant.  */
> +      Mimic it with vmovddup, just like vec_dupv2df<mask_name> does.  */
>    if (<MODE>mode == V2DFmode)
> -    return "vpbroadcastq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}";
> +    return "vmovddup\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}";
>
>    return "v<sseintprefix>broadcast<bcstscalarsuff>\t{%1, %0<mask_operand2>|%0<mask_operand2>, %<iptr>1}";
>  }



-- 
BR,
Hongtao

      reply	other threads:[~2023-06-14  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  5:54 Jan Beulich
2023-06-14  6:30 ` Hongtao Liu [this message]

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=CAMZc-bx-vGmrhE-gnE1kqgFtjbvCiqJycZSAzbPQo9XbptYTRg@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=jbeulich@suse.com \
    --cc=kirill.yukhin@gmail.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).