public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: Richard Biener <rguenther@suse.de>
Cc: Uros Bizjak <ubizjak@gmail.com>,
	Hongtao Liu <hongtao.liu@intel.com>,
	"gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][RFC] Add x86 subadd SLP pattern
Date: Tue, 22 Jun 2021 10:42:27 +0100	[thread overview]
Message-ID: <mpta6nidym4.fsf@arm.com> (raw)
In-Reply-To: <nycvar.YFH.7.76.2106171243010.9200@zhemvz.fhfr.qr> (Richard Biener's message of "Thu, 17 Jun 2021 12:43:45 +0200 (CEST)")

Richard Biener <rguenther@suse.de> writes:
> On Thu, 17 Jun 2021, Uros Bizjak wrote:
>
>> On Thu, Jun 17, 2021 at 11:44 AM Richard Biener <rguenther@suse.de> wrote:
>> >
>> > This addds SLP pattern recognition for the SSE3/AVX [v]addsubp{ds} v0, v1
>> > instructions which compute { v0[0] - v1[0], v0[1], + v1[1], ... }
>> > thus subtract, add alternating on lanes, starting with subtract.
>> >
>> > It adds a corresponding optab and direct internal function,
>> > vec_subadd$a3 and at the moment to make the i386 backend changes
>> > "obvious", duplicates the existing avx_addsubv4df3 pattern with
>> > the new canonical name (CODE_FOR_* and gen_* are used throughout the
>> > intrinsic code, so the actual change to rename all existing patterns
>> > will be quite a bit bigger).  I expect some bike-shedding on
>> > subadd vs. addsub so I delay that change ;)
>> 
>> Well, the pattern is called addsub in the x86 world because highpart
>> does add and lowpart does sub. In left-to-right writing systems
>> highpart comes before lowpart, so you have addsub.
>
> The other targets mentioned do not seem to agree but I can live
> with that, thus I'll change back to addsub.

FWIW, subadd sounds clearer to me too.  It seems surprising to put
imaginary before real when interpreting something as complex, for example.

Putting the highpart first feels especially odd on an LE system like x86…

Richard

  parent reply	other threads:[~2021-06-22  9:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  9:44 Richard Biener
2021-06-17  9:54 ` Uros Bizjak
2021-06-17 10:00   ` Richard Biener
2021-06-17 10:09     ` Uros Bizjak
2021-06-17  9:59 ` Uros Bizjak
2021-06-17 10:43   ` Richard Biener
2021-06-17 13:47     ` Richard Biener
2021-06-22  9:42     ` Richard Sandiford [this message]
2021-06-22 10:17       ` Uros Bizjak
2021-06-22 10:34         ` Richard Biener
2021-06-22 10:49           ` Uros Bizjak
2021-06-24 11:07             ` Richard Biener
2021-06-24 14:25               ` Uros Bizjak
2021-06-25  6:48                 ` Richard Biener
2021-06-25  7:55                   ` Uros Bizjak
2021-06-17 10:24 ` Tamar Christina

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=mpta6nidym4.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=rguenther@suse.de \
    --cc=ubizjak@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).