public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36821] Flush denormals to Zero Flag
       [not found] <bug-36821-4@http.gcc.gnu.org/bugzilla/>
@ 2022-12-26  1:12 ` cvs-commit at gcc dot gnu.org
  2022-12-26  2:13 ` kargl at gcc dot gnu.org
  2022-12-26  2:18 ` crazylht at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-26  1:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:e54375d85d4aa5889869c2672158083b2106b623

commit r13-4891-ge54375d85d4aa5889869c2672158083b2106b623
Author: liuhongt <hongtao.liu@intel.com>
Date:   Mon Dec 12 15:43:58 2022 +0800

    x86: Add a new option -mdaz-ftz to enable FTZ and DAZ flags in MXCSR.

    if (mdaz-ftz)
      link crtfastmath.o
    else if ((Ofast || ffast-math || funsafe-math-optimizations)
             && !shared && !mno-daz-ftz)
      link crtfastmath.o
    else
      Don't link crtfastmath.o

    gcc/ChangeLog:

            PR target/55522
            PR target/36821
            * config/i386/gnu-user-common.h (GNU_USER_TARGET_MATHFILE_SPEC):
            Link crtfastmath.o whenever -mdaz-ftz is specified. Don't link
            crtfastmath.o when -share or -mno-daz-ftz is specified.
            * config/i386/i386.opt (mdaz-ftz): New option.
            * doc/invoke.texi (x86 options): Document mftz-daz.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36821] Flush denormals to Zero Flag
       [not found] <bug-36821-4@http.gcc.gnu.org/bugzilla/>
  2022-12-26  1:12 ` [Bug target/36821] Flush denormals to Zero Flag cvs-commit at gcc dot gnu.org
@ 2022-12-26  2:13 ` kargl at gcc dot gnu.org
  2022-12-26  2:18 ` crazylht at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-12-26  2:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #7 from kargl at gcc dot gnu.org ---
(In reply to CVS Commits from comment #6)
> The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:e54375d85d4aa5889869c2672158083b2106b623
> 
> commit r13-4891-ge54375d85d4aa5889869c2672158083b2106b623
> Author: liuhongt <hongtao.liu@intel.com>
> Date:   Mon Dec 12 15:43:58 2022 +0800
> 
>     x86: Add a new option -mdaz-ftz to enable FTZ and DAZ flags in MXCSR.
>     
>     if (mdaz-ftz)
>       link crtfastmath.o
>     else if ((Ofast || ffast-math || funsafe-math-optimizations)
>              && !shared && !mno-daz-ftz)
>       link crtfastmath.o
>     else
>       Don't link crtfastmath.o
>     
>     gcc/ChangeLog:
>     
>             PR target/55522
>             PR target/36821
>             * config/i386/gnu-user-common.h (GNU_USER_TARGET_MATHFILE_SPEC):
>             Link crtfastmath.o whenever -mdaz-ftz is specified. Don't link
>             crtfastmath.o when -share or -mno-daz-ftz is specified.
>             * config/i386/i386.opt (mdaz-ftz): New option.
>             * doc/invoke.texi (x86 options): Document mftz-daz.

Does -mdaz-ftz actually activate all of -ffast-math and/or
-funsafe-math-optimizations?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36821] Flush denormals to Zero Flag
       [not found] <bug-36821-4@http.gcc.gnu.org/bugzilla/>
  2022-12-26  1:12 ` [Bug target/36821] Flush denormals to Zero Flag cvs-commit at gcc dot gnu.org
  2022-12-26  2:13 ` kargl at gcc dot gnu.org
@ 2022-12-26  2:18 ` crazylht at gmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: crazylht at gmail dot com @ 2022-12-26  2:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821

Hongtao.liu <crazylht at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crazylht at gmail dot com

--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
> Does -mdaz-ftz actually activate all of -ffast-math and/or
> -funsafe-math-optimizations?

No, -mdaz-ftz only set DAZ and FTZ bits.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36821] Flush denormals to Zero Flag
  2008-07-14 10:27 [Bug fortran/36821] New: " J dot Hogg at rl dot ac dot uk
  2010-04-09  3:43 ` [Bug target/36821] " nick2893 at hotmail dot com
  2010-04-09  6:26 ` ubizjak at gmail dot com
@ 2010-04-09 15:31 ` nick2893 at hotmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: nick2893 at hotmail dot com @ 2010-04-09 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from nick2893 at hotmail dot com  2010-04-09 15:30 -------
I'm still not getting FTZ ... unless I misunderstood your suggestion, here's
what I did after compiling with -O2:

root@nick-desktop:/home/test408# gfortran -o test4f
/usr/lib/gcc/i486-linux-gnu/4.4.0/crtfastmath.o TEST4SRC1.o TEST4SRC2.o
TEST4SRCU.o


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36821] Flush denormals to Zero Flag
  2008-07-14 10:27 [Bug fortran/36821] New: " J dot Hogg at rl dot ac dot uk
  2010-04-09  3:43 ` [Bug target/36821] " nick2893 at hotmail dot com
@ 2010-04-09  6:26 ` ubizjak at gmail dot com
  2010-04-09 15:31 ` nick2893 at hotmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2010-04-09  6:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ubizjak at gmail dot com  2010-04-09 06:26 -------
(In reply to comment #3)

> The tradeoff of "either FTZ or Optimized" I think will not work for me.

Find crtfastmath.o in gcc build directory and link it to your final executable.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36821] Flush denormals to Zero Flag
  2008-07-14 10:27 [Bug fortran/36821] New: " J dot Hogg at rl dot ac dot uk
@ 2010-04-09  3:43 ` nick2893 at hotmail dot com
  2010-04-09  6:26 ` ubizjak at gmail dot com
  2010-04-09 15:31 ` nick2893 at hotmail dot com
  2 siblings, 0 replies; 6+ messages in thread
From: nick2893 at hotmail dot com @ 2010-04-09  3:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from nick2893 at hotmail dot com  2010-04-09 03:42 -------
I am looking for both Optimized like O2 and FTZ.  I have a large Fortran
program.  Without FTZ it gets weird crashes that should not be happening (no
problems on any other compilers!)  Without optimization it runs way too slow.

Any optimization overrides any attempts at FTZ, such as

_MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON); 
-ffast-math

The tradeoff of "either FTZ or Optimized" I think will not work for me.


-- 

nick2893 at hotmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nick2893 at hotmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36821


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-26  2:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-36821-4@http.gcc.gnu.org/bugzilla/>
2022-12-26  1:12 ` [Bug target/36821] Flush denormals to Zero Flag cvs-commit at gcc dot gnu.org
2022-12-26  2:13 ` kargl at gcc dot gnu.org
2022-12-26  2:18 ` crazylht at gmail dot com
2008-07-14 10:27 [Bug fortran/36821] New: " J dot Hogg at rl dot ac dot uk
2010-04-09  3:43 ` [Bug target/36821] " nick2893 at hotmail dot com
2010-04-09  6:26 ` ubizjak at gmail dot com
2010-04-09 15:31 ` nick2893 at hotmail dot com

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).