public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103683] Redundant !__builtin_isnan not removed with -fno-signaling-nans Date: Tue, 14 Dec 2021 00:05:12 +0000 [thread overview] Message-ID: <bug-103683-4-klSgsLB8IA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103683-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103683 --- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- (x > 1) is expected to raise invalid for a quiet NaN, so the two functions are different in the absence of -fno-trapping-math, whether or not signaling NaNs are enabled. ((!__builtin_isnan (x)) && x > 1) is equivalent to __builtin_isgreater (x, 1.0) and could be optimized accordingly for -fno-signaling-nans, however. (With signaling NaNs, you have the issue that the first expression doesn't raise invalid for a signaling NaN but the second does.)
prev parent reply other threads:[~2021-12-14 0:05 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-13 12:51 [Bug tree-optimization/103683] New: " tkoenig at gcc dot gnu.org 2021-12-14 0:05 ` joseph at codesourcery dot com [this message]
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=bug-103683-4-klSgsLB8IA@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).