public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH 4/4] x86: provide a 128-bit VBROADCASTSD pseudo
Date: Tue, 20 Jun 2023 09:07:56 -0700	[thread overview]
Message-ID: <CAMe9rOq5VJEBP1=_Wi7DEO7wDxJvnz2Nk7y4MzQ_J2j5BW2e0A@mail.gmail.com> (raw)
In-Reply-To: <1643ea25-70ea-b9f4-df17-84607e82f5fb@suse.com>

On Mon, Jun 19, 2023 at 12:20 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 16.06.2023 18:59, H.J. Lu wrote:
> > On Fri, Jun 16, 2023 at 12:32 AM Jan Beulich <jbeulich@suse.com> wrote:
> >> VBROADCASTSD not supporting 128-bit destinations in any of their AVX,
> >> AVX2, or AVX512F incarnations is presumably because of VMOVDDUP
> >> precisely supporting this very operation. (It is therefore different
> >> from e.g. VPBROADCASTQ, which has no exact equivalent.) Still its
> >> absence has led to people using VPBROADCASTQ as substitution; this could
> >> have been avoided if such a pseudo had been supported from the very
> >> beginning.
> >>
> >> Note that the pseudos try to match what the real instructions would have
> >> used as closely as possible, i.e. VexW0 instead of VexWIG for the AVX
> >> and AVX2 forms as well as AVX2 in the first place for the register
> >> source form.
> >> ---
> >> For being the first example of us supplying such, this is partly RFC. On
> >> top of that a question is also whether to indeed have split AVX/AVX2
> >> templates, when in principle one (allowing for both memory and register
> >> source) could do.
> >>
> >
> > I don't think assembler should invent such instructions.
>
> May I ask about the "why" behind this? If such a pseudo had been there
> from the beginning, an admittedly minor mistake like that corrected by
> gcc commit a4df0ce78d6f likely wouldn't have been made, because no
> special casing of V2DFmode would have been necessary in the first place.
>
> Jan

All x86 instructions should come from the x86 SDM.

-- 
H.J.

  reply	other threads:[~2023-06-20 16:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16  7:29 [PATCH 0/4] x86: some more optimization plus a new pseudo insn form Jan Beulich
2023-06-16  7:30 ` [PATCH 1/4] x86: optimize pre-AVX512 {,V}PCMPEQQ with identical sources Jan Beulich
2023-06-16  7:31 ` [PATCH 2/4] x86: optimize pre-AVX512 {,V}PCMPGT* " Jan Beulich
2023-06-16  7:31 ` [PATCH 3/4] x86: optimize 128-bit VPBROADCASTQ to VPUNPCKLQDQ Jan Beulich
2023-06-16  7:32 ` [PATCH 4/4] x86: provide a 128-bit VBROADCASTSD pseudo Jan Beulich
2023-06-16 16:59   ` H.J. Lu
2023-06-19  7:20     ` Jan Beulich
2023-06-20 16:07       ` H.J. Lu [this message]
2023-06-21  9:01         ` Jan Beulich

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='CAMe9rOq5VJEBP1=_Wi7DEO7wDxJvnz2Nk7y4MzQ_J2j5BW2e0A@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=jbeulich@suse.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).