public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Uros Bizjak <ubizjak@gmail.com>, "H.J. Lu" <hjl.tools@gmail.com>,
	gcc-patches@gcc.gnu.org,  Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH V2 2/2] [x86] x86: Add a new option -mdaz-ftz to enable FTZ and DAZ flags in MXCSR.
Date: Wed, 10 May 2023 09:41:06 +0800	[thread overview]
Message-ID: <CAMZc-bzGiacWG5qOYyWRzAJWFb4BsSsXS=2gOP3QenUVG6Z8wQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc3O4g7F-f90dNTH99=jqA0ReFN6fkD2-M=saUp9=13V0g@mail.gmail.com>

On Thu, May 4, 2023 at 5:49 PM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Thu, May 4, 2023 at 7:37 AM Hongtao Liu via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > On Thu, May 4, 2023 at 1:35 PM Hongtao Liu <crazylht@gmail.com> wrote:
> > >
> > > On Thu, Dec 22, 2022 at 4:04 PM Uros Bizjak <ubizjak@gmail.com> wrote:
> > > >
> > > > On Thu, Dec 22, 2022 at 5:40 AM Hongtao Liu <crazylht@gmail.com> wrote:
> > > > >
> > > > > On Thu, Dec 22, 2022 at 6:46 AM Jakub Jelinek <jakub@redhat.com> wrote:
> > > > > >
> > > > > > On Wed, Dec 21, 2022 at 02:43:43PM -0800, H.J. Lu wrote:
> > > > > > > > > > > > >  Target RejectNegative
> > > > > > > > > > > > >  Set 80387 floating-point precision to 80-bit.
> > > > > > > > > > > > >
> > > > > > > > > > > > > +mdaz-ftz
> > > > > > > > > > > > > +Target
> > > > > > > > > > > >
> > > > > > > > > > > > s/Target/Driver/
> > > > > > > > > > > Change to Driver and Got error like:cc1: error: command-line option
> > > > > > > > > > > ‘-mdaz-ftz’ is valid for the driver but not for C.
> > > > > > > > > > Hi Jakub:
> > > > > > > > > >   I didn't find a good solution to handle this error after changing
> > > > > > > > > > *Target* to *Driver*, Could you give some hints how to solve this
> > > > > > > > > > problem?
> > > > > > > > > > Or is it ok for you to mark this as *Target*(there won't be any save
> > > > > > > > > > and restore in cfun since there's no variable defined here.)
> > > > > > > > >
> > > > > > > > > Since all -m* options are passed to cc1, -mdaz-ftz can't be marked
> > > > > > > > > as Driver.  We need to give it a different name to mark it as Driver.
> > > > > > > >
> > > > > > > > It is ok like that.
> > > > > > > >
> > > > > > > >         Jakub
> > > > > > > >
> > > > > > >
> > > > > > > The GCC driver handles -mno-XXX automatically for -mXXX.  Use
> > > > > > > a different name needs to handle the negation.   Or we can do something
> > > > > > > like this to check for CL_DRIVER before passing it to cc1.
> > > > > >
> > > > > > I meant I'm ok with -m{,no-}daz-ftz option being Target rather than Driver.
> > > > > >
> > > > > Thanks.
> > > > > Uros, Is the patch for you?
> > > >
> > > > The original patch is then OK.
> > > Some users found the -mdaz-ftz option to be very useful, and want it
> > > to be backport to GCC12 and GCC11.
> > > But the patch is not a bugfix one, so i'd like to ask options from
> > s/options/opinions/g
> > > other maintainers, if the patch is suitable for backport?
> > >
> > > The backport patches include both this one and [1] which apply
> > > -mdaz-ftz to all other x86 targets.
> > >
> > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610053.html
>
> Please make sure to not backport the -ffast-math linker spec change though.
> Also note the 12 branch is currently frozen.
You're meaning don't backport -shared part since it will cause
different behavior between different backends. ?
I'm trying to backport the daz-ftz part, it won't change the existed
behavior for fast-math or shared.
%{mdaz-ftz:crtfastmath.o%s;Ofast|ffast-math|funsafe-math-optimizations:%{!mno-daz-ftz:crtfastmath.o%s}}
>
> I'll defer to x86 maintainers on the -mdaz-ftz flag itself.
>
> Richard.
>
> > > >
> > > > Thanks,
> > > > Uros.
> > >
> > >
> > >
> > > --
> > > BR,
> > > Hongtao
> >
> >
> >
> > --
> > BR,
> > Hongtao



-- 
BR,
Hongtao

  reply	other threads:[~2023-05-10  1:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14  2:18 [PATCH] [x86] x86: Don't add crtfastmath.o for -shared and add " liuhongt
2022-12-14  8:08 ` Richard Biener
2022-12-14  8:16   ` Jakub Jelinek
2022-12-14  8:23     ` Richard Biener
2022-12-14  8:34       ` Liu, Hongtao
2022-12-14  8:52         ` Richard Biener
2022-12-14  9:07           ` Uros Bizjak
2022-12-15  6:21             ` [PATCH V2 1/2] x86: Don't add crtfastmath.o for -shared liuhongt
2022-12-15  6:21               ` [PATCH V2 2/2] [x86] x86: Add a new option -mdaz-ftz to enable FTZ and DAZ flags in MXCSR liuhongt
2022-12-15  7:39                 ` Jakub Jelinek
2022-12-15  7:45                   ` Hongtao Liu
2022-12-20  4:51                     ` Hongtao Liu
2022-12-21 20:20                       ` H.J. Lu
2022-12-21 22:35                         ` Jakub Jelinek
2022-12-21 22:43                           ` H.J. Lu
2022-12-21 22:46                             ` Jakub Jelinek
2022-12-22  4:40                               ` Hongtao Liu
2022-12-22  8:04                                 ` Uros Bizjak
2023-05-04  5:35                                   ` Hongtao Liu
2023-05-04  5:36                                     ` Hongtao Liu
2023-05-04  9:49                                       ` Richard Biener
2023-05-10  1:41                                         ` Hongtao Liu [this message]
2023-05-10  6:41                                           ` Richard Biener
2023-05-10  9:07                                             ` [PATCH] " liuhongt
2023-05-12  5:43                                               ` Hongtao Liu
2023-05-15  1:16                                                 ` Hongtao Liu
2022-12-16  9:50               ` [PATCH V2 1/2] x86: Don't add crtfastmath.o for -shared Uros Bizjak

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='CAMZc-bzGiacWG5qOYyWRzAJWFb4BsSsXS=2gOP3QenUVG6Z8wQ@mail.gmail.com' \
    --to=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jakub@redhat.com \
    --cc=richard.guenther@gmail.com \
    --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).