From: Joseph Myers <joseph@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Aldy Hernandez <aldyh@redhat.com>,
GCC patches <gcc-patches@gcc.gnu.org>,
Andrew MacLeod <amacleod@redhat.com>
Subject: Re: [PATCH] [range-ops] Implement sqrt.
Date: Thu, 17 Nov 2022 20:43:20 +0000 [thread overview]
Message-ID: <8e22b2f-bb4-8c33-17c6-bd7da3b7b1f5@codesourcery.com> (raw)
In-Reply-To: <Y3aNdG7AqGQxlQKc@tucnak>
On Thu, 17 Nov 2022, Jakub Jelinek via Gcc-patches wrote:
> On Thu, Nov 17, 2022 at 06:59:45PM +0000, Joseph Myers wrote:
> > On Thu, 17 Nov 2022, Aldy Hernandez via Gcc-patches wrote:
> >
> > > So... is the optimization wrong? Are we not allowed to substitute
> > > that NAN if we know it's gonna happen? Should we also allow F F F F F
> > > in the test? Or something else?
> >
> > This seems like the usual ambiguity about what transformations
> > -ftrapping-math (on by default) is meant to prevent.
> >
> > Generally it's understood to prevent transformations that add *or remove*
> > exceptions, so folding a case that raises "invalid" to a NaN (with
> > "invalid" no longer raised) is invalid with -ftrapping-math. But that
> > doesn't tend to be applied if the operation raising the exceptions has a
> > result that is otherwise unused - in such a case the operation may still
> > be removed completely (the exception isn't properly treated as a side
> > effect to avoid dead code elimination; cf. Marc Glisse's -ffenv-access
> > patches from August 2020). And it may often also not be applied to
> > "inexact".
>
> The problem is that the above model I'm afraid is largely incompatible with
> the optimizations ranger provides.
That model is more an empirical description of when the nominal
-ftrapping-math semantics tend to be respected, than a coherent design for
any kind of API commitment to what the option does or what the default
trapping-math rules are.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2022-11-17 20:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 20:05 Aldy Hernandez
2022-11-13 20:39 ` Jakub Jelinek
2022-11-14 7:45 ` Aldy Hernandez
2022-11-14 14:30 ` Jeff Law
2022-11-14 14:35 ` Jakub Jelinek
2022-11-14 14:48 ` Jeff Law
2022-11-14 15:01 ` Aldy Hernandez
2022-11-14 21:55 ` Joseph Myers
2022-11-16 20:32 ` Jakub Jelinek
2022-11-17 16:40 ` Aldy Hernandez
2022-11-17 16:48 ` Aldy Hernandez
2022-11-17 17:42 ` Aldy Hernandez
2022-11-17 18:59 ` Joseph Myers
2022-11-17 19:37 ` Jakub Jelinek
2022-11-17 20:43 ` Joseph Myers [this message]
2022-11-18 8:39 ` Richard Biener
2022-11-18 10:37 ` Aldy Hernandez
2022-11-18 10:44 ` Jakub Jelinek
2022-11-18 11:20 ` Aldy Hernandez
2022-11-18 11:57 ` Aldy Hernandez
2022-11-18 12:14 ` 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=8e22b2f-bb4-8c33-17c6-bd7da3b7b1f5@codesourcery.com \
--to=joseph@codesourcery.com \
--cc=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.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).