From: Tamar Christina <Tamar.Christina@arm.com>
To: Xi Ruoyao <xry111@xry111.site>, Palmer Dabbelt <palmer@dabbelt.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
nd <nd@arm.com>, "rguenther@suse.de" <rguenther@suse.de>,
Jeff Law <jlaw@ventanamicro.com>
Subject: RE: [PATCH]middle-end: Don't apply copysign optimization if target does not implement optab [PR112468]
Date: Fri, 5 Jan 2024 11:02:40 +0000 [thread overview]
Message-ID: <VI1PR08MB5325B1826E11A3D05B0241D5FF662@VI1PR08MB5325.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <5a205676439f24ba0b5ec980604fa40fa0449eac.camel@xry111.site>
> -----Original Message-----
> From: Xi Ruoyao <xry111@xry111.site>
> Sent: Thursday, January 4, 2024 10:39 PM
> To: Palmer Dabbelt <palmer@dabbelt.com>; Tamar Christina
> <Tamar.Christina@arm.com>
> Cc: gcc-patches@gcc.gnu.org; nd <nd@arm.com>; rguenther@suse.de; Jeff Law
> <jlaw@ventanamicro.com>
> Subject: Re: [PATCH]middle-end: Don't apply copysign optimization if target does
> not implement optab [PR112468]
>
> On Thu, 2024-01-04 at 14:32 -0800, Palmer Dabbelt wrote:
> > > +proc check_effective_target_ifn_copysign { } {
> > > + return [check_cached_effective_target_indexed ifn_copysign {
> > > + expr {
> > > + (([istarget i?86-*-*] || [istarget x86_64-*-*])
> > > + && [is-effective-target sse])
> > > + || ([istarget loongarch*-*-*] && [check_effective_target_loongarch_sx])
>
> LoongArch has [scalar FP copysign][1] too.
>
> [1]:https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-
> EN.html#_fscaleblogbcopysign_sd
Ok, so something like:
|| ([istarget loongarch*-*-*] && ([check_effective_target_loongarch_sx] || [check_effective_target_hard_float]))
?
>
> > > + || ([istarget powerpc*-*-*]
> > > + && ![istarget powerpc-*-linux*paired*])
> > > + || [istarget alpha*-*-*]
> > > + || [istarget aarch64*-*-*]
> > > + || [is-effective-target arm_neon]
> > > + || ([istarget s390*-*-*]
> > > + && [check_effective_target_s390_vx])
> > > + || ([istarget riscv*-*-*]
> > > + && [check_effective_target_riscv_v])
> >
> > Unless I'm missing something, we have copysign in the scalar
> > floating-point ISAs as well. So I think this should be
> >
> > || ([istarget riscv*-*-*]
> > && [check_effective_target_hard_float])
>
Ah cool, will update it in next version.
Thanks,
Tamar
> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2024-01-05 11:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 18:20 Tamar Christina
2024-01-04 22:32 ` Palmer Dabbelt
2024-01-04 22:38 ` Xi Ruoyao
2024-01-05 11:02 ` Tamar Christina [this message]
2024-01-05 11:47 ` Xi Ruoyao
2024-01-05 13:30 ` Tamar Christina
2024-01-10 9:25 ` Tamar Christina
2024-01-10 12:29 ` 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=VI1PR08MB5325B1826E11A3D05B0241D5FF662@VI1PR08MB5325.eurprd08.prod.outlook.com \
--to=tamar.christina@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jlaw@ventanamicro.com \
--cc=nd@arm.com \
--cc=palmer@dabbelt.com \
--cc=rguenther@suse.de \
--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).