public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tamar Christina <Tamar.Christina@arm.com>
To: Richard Sandiford <Richard.Sandiford@arm.com>,
	Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH]middle-end Use subregs to expand COMPLEX_EXPR to set the lowpart.
Date: Thu, 16 Jun 2022 11:22:14 +0000	[thread overview]
Message-ID: <VI1PR08MB5325F4FC2D08E1128A0C2465FFAC9@VI1PR08MB5325.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <mptczfacg5n.fsf@arm.com>

> -----Original Message-----
> From: Gcc-patches <gcc-patches-
> bounces+tamar.christina=arm.com@gcc.gnu.org> On Behalf Of Richard
> Sandiford via Gcc-patches
> Sent: Wednesday, June 15, 2022 12:36 PM
> To: Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org>
> Subject: Re: [PATCH]middle-end Use subregs to expand COMPLEX_EXPR to
> set the lowpart.
> 
> Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> > On 6/13/2022 5:54 AM, Richard Biener wrote:
> >> On Sun, Jun 12, 2022 at 7:27 PM Jeff Law via Gcc-patches
> >> <gcc-patches@gcc.gnu.org> wrote:
> >> [...]
> >>> On a related topic, any thoughts on keeping complex objects as
> >>> complex types/modes through gimple and into at least parts of the RTL
> pipeline?
> >>>
> >>> The way complex arithmetic instructions work on our chip is going to
> >>> be extremely tough to utilize in GCC -- we really need to the
> >>> complex types/arithmetic up through RTL generation at the least. Ideally
> we'd
> >>> even expose complex modes all the way to final.    Is that something
> >>> y'all could benefit from as well?  Have y'all poked at this problem at all?
> >> Since you are going to need to "recover" complex operations from
> >> people open-coding them (both fortran and C and also C++ with
> >> std::complex) it should be less work to just do that ;)  I think that
> >> complex modes and types exist solely for ABI purposes.
> > I don't see any reasonable way to do that.  Without going into all the
> > details, our complex ops work on low elements within a vector
> > register.   Trying to recover them after gimple->rtl expansion would
> > be similar to trying to SLP vectorize on RTL, something I'm not keen to
> chase.
> >
> > It would be a hell of a lot easier to leave the complex ops as complex
> > ops to the expanders, then make the decision to use the complex
> > instructions or decompose into components.
> 
> Realise you might not be in a position to answer this for confidentiality
> reasons, but: would normal tree SLP not help here?  We already try to
> recognise complex add & multiply, and in principle we could do the same for
> other operations as well.  It shouldn't matter that a vector multiply on 2
> elements is really just a single-data operation.

I guess if we're talking about scalar we currently don't recognize TWO_OPERANDS
as seeds to SLP. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31485  I did briefly
consider this but the problem is that if we do then we'd have to construct the scalar
complex value on the SIMD side, and that may negate any gains if the op being done is
simple. i.e. for a simple multiply the scalar code would win.  But I suppose that's
something the cost model should be able to decide.

Cheers,
Tamar

> 
> Thanks,
> Richard

  reply	other threads:[~2022-06-16 11:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09  7:52 Tamar Christina
2022-06-12 17:27 ` Jeff Law
2022-06-13 10:19   ` Tamar Christina
2022-06-13 17:42     ` Jeff Law
2022-06-13 11:54   ` Richard Biener
2022-06-13 17:34     ` Jeff Law
2022-06-15 11:36       ` Richard Sandiford
2022-06-16 11:22         ` Tamar Christina [this message]
2022-06-24 21:54         ` Jeff Law
2022-06-13  8:40 ` Richard Sandiford
2022-06-16 11:28   ` Tamar Christina
2022-06-17 17:13     ` Richard Sandiford
2022-06-20  8:00       ` Richard Sandiford
2022-07-05 15:05         ` Tamar Christina
2022-07-05 16:11           ` Richard Sandiford
2022-08-29 10:52             ` Richard Biener

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=VI1PR08MB5325F4FC2D08E1128A0C2465FFAC9@VI1PR08MB5325.eurprd08.prod.outlook.com \
    --to=tamar.christina@arm.com \
    --cc=Richard.Sandiford@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).