public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4121] [range-ops] Minor readability fix.
@ 2022-11-17  6:41 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-11-17  6:41 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2b2f2ee49a33419f9d19f548e6a8ce520818a5d2

commit r13-4121-g2b2f2ee49a33419f9d19f548e6a8ce520818a5d2
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Nov 14 10:29:13 2022 +0100

    [range-ops] Minor readability fix.
    
    gcc/ChangeLog:
    
            * range-op-float.cc (range_operator_float::fold_range): Make check
            for maybe_isnan more readable.

Diff:
---
 gcc/range-op-float.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc
index 0c4ec8dd178..adb0cbaa6d5 100644
--- a/gcc/range-op-float.cc
+++ b/gcc/range-op-float.cc
@@ -83,10 +83,12 @@ range_operator_float::fold_range (frange &r, tree type,
 
   r.set (type, lb, ub);
 
-  if (lb_nan || ub_nan || maybe_nan)
+  if (lb_nan || ub_nan || maybe_nan
+      || op1.maybe_isnan ()
+      || op2.maybe_isnan ())
     // Keep the default NAN (with a varying sign) set by the setter.
     ;
-  else if (!op1.maybe_isnan () && !op2.maybe_isnan ())
+  else
     r.clear_nan ();
 
   return true;

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

only message in thread, other threads:[~2022-11-17  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17  6:41 [gcc r13-4121] [range-ops] Minor readability fix 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).