public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tamar Christina <Tamar.Christina@arm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Xi Ruoyao <xry111@xry111.site>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	David Edelsohn <dje.gcc@gmail.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Andrew Pinski <apinski@marvell.com>
Subject: RE: [PATCH] rs6000: Canonicalize copysign (x, -1) back to -abs (x) in the backend [PR112606]
Date: Mon, 27 Nov 2023 08:22:28 +0000	[thread overview]
Message-ID: <VI1PR08MB53255CB6508CBE73B15EE0D3FFBDA@VI1PR08MB5325.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <ZWRPeAxnJ/rJKIns@tucnak>

> -----Original Message-----
> From: Jakub Jelinek <jakub@redhat.com>
> Sent: Monday, November 27, 2023 8:13 AM
> To: Tamar Christina <Tamar.Christina@arm.com>
> Cc: Xi Ruoyao <xry111@xry111.site>; Segher Boessenkool
> <segher@kernel.crashing.org>; David Edelsohn <dje.gcc@gmail.com>; gcc-
> patches@gcc.gnu.org; Andrew Pinski <apinski@marvell.com>
> Subject: Re: [PATCH] rs6000: Canonicalize copysign (x, -1) back to -abs (x) in
> the backend [PR112606]
> 
> On Mon, Nov 27, 2023 at 07:55:52AM +0000, Tamar Christina wrote:
> > > For POPCOUNT I've introduced recently a way to provide custom
> > > expand_* function and decide there what optimizations to use, even
> > > when it otherwise is an integral unary optab ifn.
> > >
> >
> > Oh that sounds interesting, do you have a commit for me to look at? I
> > couldn't Spot anything obvious in the history.
> 
> https://gcc.gnu.org/r14-5613

Oh, that's nice! If that's the case a simpler fix could be to let COPYSIGN become
one of these as well, and then just have PPC do a FAIL on the abs and neg cases.

Expand_copysign already does the fneg (fabs ()) rewriting if the target rejects the
optab through expand_copysign_absneg

That would also fix the i386 and Arm assembly scan failures and te phi-opts case
when the IFN isn't available.. I can do that if you prefer? Since those are on my list
to fix anyway.

Thanks,
Tamar

> 
> 	Jakub


  reply	other threads:[~2023-11-27  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-25 10:17 Jakub Jelinek
2023-11-25 10:42 ` Xi Ruoyao
2023-11-25 12:03   ` Tamar Christina
2023-11-25 12:09     ` Jakub Jelinek
2023-11-27  7:55       ` Tamar Christina
2023-11-27  8:12         ` Jakub Jelinek
2023-11-27  8:22           ` Tamar Christina [this message]
2023-12-04  8:35 ` Patch ping: " Jakub Jelinek
2023-12-04  9:21 ` Kewen.Lin

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=VI1PR08MB53255CB6508CBE73B15EE0D3FFBDA@VI1PR08MB5325.eurprd08.prod.outlook.com \
    --to=tamar.christina@arm.com \
    --cc=apinski@marvell.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=segher@kernel.crashing.org \
    --cc=xry111@xry111.site \
    /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).