From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com>
Subject: [COMMITTED] Do not test for -Inf when flag_finite_math_only.
Date: Mon, 17 Oct 2022 15:28:38 +0200 [thread overview]
Message-ID: <20221017132838.24693-1-aldyh@redhat.com> (raw)
PR tree-optimizatin/107286
gcc/ChangeLog:
* value-range.cc (range_tests_floats): Do not test for -Inf when
flag_finite_math_only.
---
gcc/value-range.cc | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 4794d2386a8..90d5e660684 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -4022,10 +4022,13 @@ range_tests_floats ()
r0.intersect (r1);
ASSERT_TRUE (r0.undefined_p ());
- // Make sure [-Inf, -Inf] doesn't get normalized.
- r0 = frange_float ("-Inf", "-Inf");
- ASSERT_TRUE (real_isinf (&r0.lower_bound (), true));
- ASSERT_TRUE (real_isinf (&r0.upper_bound (), true));
+ if (!flag_finite_math_only)
+ {
+ // Make sure [-Inf, -Inf] doesn't get normalized.
+ r0 = frange_float ("-Inf", "-Inf");
+ ASSERT_TRUE (real_isinf (&r0.lower_bound (), true));
+ ASSERT_TRUE (real_isinf (&r0.upper_bound (), true));
+ }
}
void
--
2.37.3
reply other threads:[~2022-10-17 13:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221017132838.24693-1-aldyh@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@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: 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).