public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3335] Do not test for -Inf when flag_finite_math_only.
@ 2022-10-17 13:29 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-10-17 13:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cb1edef9f4dadeffa15fdfd2fb206d78027b7b32

commit r13-3335-gcb1edef9f4dadeffa15fdfd2fb206d78027b7b32
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Oct 17 15:26:05 2022 +0200

    Do not test for -Inf when flag_finite_math_only.
    
            PR tree-optimization/107286
    
    gcc/ChangeLog:
    
            * value-range.cc (range_tests_floats): Do not test for -Inf when
            flag_finite_math_only.

Diff:
---
 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-17 13:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 13:29 [gcc r13-3335] Do not test for -Inf when flag_finite_math_only Aldy Hernandez

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