aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/value-range.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/value-range.h b/gcc/value-range.h
index 484f911..07a2067 100644
--- a/gcc/value-range.h
+++ b/gcc/value-range.h
@@ -323,6 +323,7 @@ public:
bool known_isnan () const;
bool known_isinf () const;
bool maybe_isnan () const;
+ bool maybe_isnan (bool sign) const;
bool maybe_isinf () const;
bool signbit_p (bool &signbit) const;
private:
@@ -1295,6 +1296,18 @@ frange::maybe_isnan () const
return m_pos_nan || m_neg_nan;
}
+// Return TRUE if range is possibly a NAN with SIGN.
+
+inline bool
+frange::maybe_isnan (bool sign) const
+{
+ if (undefined_p ())
+ return false;
+ if (sign)
+ return m_neg_nan;
+ return m_pos_nan;
+}
+
// Return TRUE if range is a +NAN or -NAN.
inline bool