public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Matthias Kretz <m.kretz@gsi.de>
Cc: gcc-help@gcc.gnu.org, GCC Patches <gcc-patches@gcc.gnu.org>,
	 GCC Development <gcc@gcc.gnu.org>,
	"H. J. Lu" <hjl.tools@gmail.com>
Subject: Re: [Questions] Is there any bit in gimple/rtl to indicate this IR support fast-math or not?
Date: Wed, 14 Jul 2021 15:04:23 +0800	[thread overview]
Message-ID: <CAMZc-bwMd6BuHR3i_eZ5nUXXjUR_ALQXcr+j_ZOTMEp5LZaoCg@mail.gmail.com> (raw)
In-Reply-To: <43954837.W2eNPKTWaK@excalibur>

On Wed, Jul 14, 2021 at 2:39 PM Matthias Kretz <m.kretz@gsi.de> wrote:
>
> On Wednesday, 14 July 2021 07:18:29 CEST Hongtao Liu via Gcc-help wrote:
> > On Wed, Jul 14, 2021 at 1:15 PM Hongtao Liu <crazylht@gmail.com> wrote:
> > > Hi:
> > >   The original problem was that some users wanted the cmdline option
> > >
> > > -ffast-math not to act on intrinsic production code.
>
> This sounds like the users want intrinsics to map *directly* to the
Thanks for the reply.
I think the users want the mixed usage of fast-math and no-fast-math.
> corresponding instruction. If that's the case such users should use inline
> assembly, IMHO. If you compile a TU with -ffast-math then *all* floating-point
> operations are affected. Yes, more control over where to use fast-math and the
> ability to mix fast-math and no-fast-math without risking ODR violations would
> be great. But that's a larger issue, and one that would ideally be solved in
> WG14/WG21.
hmm, guess it would need a lot of work.
>
> FWIW, this is what I'd do, i.e. turn off fast-math for the function in
> question:
> https://godbolt.org/z/3cKq5hT1o
>
> --
> ──────────────────────────────────────────────────────────────────────────
>  Dr. Matthias Kretz                           https://mattkretz.github.io
>  GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
>  std::experimental::simd              https://github.com/VcDevel/std-simd
> ──────────────────────────────────────────────────────────────────────────



-- 
BR,
Hongtao

  reply	other threads:[~2021-07-14  6:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  5:15 Hongtao Liu
2021-07-14  5:18 ` Hongtao Liu
2021-07-14  6:39   ` Matthias Kretz
2021-07-14  7:04     ` Hongtao Liu [this message]
2021-07-14  7:39       ` Richard Biener
2021-07-14 16:45         ` Segher Boessenkool
     [not found] ` <47833128.jc7mZyZMxp@excalibur>
     [not found]   ` <CAFiYyc2t690=B77Mwb9=-T_TzQvZUj7RnFVDmuaWDJBN81DtHw@mail.gmail.com>
2021-07-16  8:57     ` [RFC] c-family: Add __builtin_noassoc Matthias Kretz
2021-07-16  9:31       ` Richard Biener
2021-07-16 12:00         ` Matthias Kretz
2021-07-19  7:16           ` 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=CAMZc-bwMd6BuHR3i_eZ5nUXXjUR_ALQXcr+j_ZOTMEp5LZaoCg@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=m.kretz@gsi.de \
    /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).