public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* MIN/MAX and trapping math and NANs
@ 2023-04-01 22:29 Andrew Pinski
  2023-04-11  8:00 ` Richard Biener
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Pinski @ 2023-04-01 22:29 UTC (permalink / raw)
  To: GCC Mailing List, Richard Guenther

Hi,
  I noticed while working on phi-opt, that MIN/MAX EXPR (and the
corresponding RTL codes) both can return true for trapping even if
NANs are not honored (that is -ffinite-math-only). Is this true? I
would have assumed when -ffinite-math-only -fno-signed-zeros is used,
then MIN/MAX would be the same as a > b ? a : b which would not cause
a trap.

If we think they should not trap, then I will create a patch and test
it for GCC 14.

Thanks,
Andrew Pinski

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

end of thread, other threads:[~2023-04-11 17:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-01 22:29 MIN/MAX and trapping math and NANs Andrew Pinski
2023-04-11  8:00 ` Richard Biener
2023-04-11  8:51   ` LIU Hao
2023-04-11  8:58     ` LIU Hao
2023-04-11 10:46     ` Richard Biener
2023-04-11 15:27       ` Michael Matz
2023-04-11 17:50         ` Joseph Myers

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