On Wed, May 10, 2023 at 3:41 AM Hongtao Liu <crazy...@gmail.com> wrote:
>
> On Thu, May 4, 2023 at 5:49 PM Richard Biener
> <richard.guent...@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 <crazy...@gmail.com> wrote:
> > > >
> > > > On Thu, Dec 22, 2022 at 4:04 PM Uros Bizjak <ubiz...@gmail.com> wrote:
> > > > >
> > > > > On Thu, Dec 22, 2022 at 5:40 AM Hongtao Liu <crazy...@gmail.com> 
> > > > > wrote:
> > > > > >
> > > > > > On Thu, Dec 22, 2022 at 6:46 AM Jakub Jelinek <ja...@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}}

The quoted patch shows -shared in context and  you didn't post a
backport version
to look at.  But yes, we shouldn't change -shared behavior on a
branch, even less so make it
inconsistent between targets.

Richard.

> >
> > I'll defer to x86 maintainers on the -mdaz-ftz flag itself.
> >
> > Richard.
> >
> > > > >
> > > > > Thanks,
> > > > > Uros.
> > > >
> > > >
> > > >
> > > > --
> > > > BR,
> > > > Hongtao
> > >
> > >
> > >
> > > --
> > > BR,
> > > Hongtao
>
>
>
> --
> BR,
> Hongtao

Reply via email to