From 6c073ff0cd04abbbe8483d1d17e2491804cbf54f Mon Sep 17 00:00:00 2001
From: chengbin <bin.cheng@linux.alibaba.com>
Date: Tue, 13 Nov 2018 20:26:15 +0800
Subject: [PATCH 3/4] Check ZERO profile count regardless of precision.

---
 gcc/profile-count.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/profile-count.h b/gcc/profile-count.h
index f4d0c340a0a..6a79fced633 100644
--- a/gcc/profile-count.h
+++ b/gcc/profile-count.h
@@ -831,7 +831,7 @@ public:
       if (!initialized_p () || !other.initialized_p ())
 	return false;
       if (*this == profile_count::zero ())
-	return !(other == profile_count::zero ());
+	return other.nonzero_p ();
       if (other == profile_count::zero ())
 	return false;
       gcc_checking_assert (compatible_p (other));
@@ -844,7 +844,7 @@ public:
       if (*this  == profile_count::zero ())
 	return false;
       if (other == profile_count::zero ())
-	return !(*this == profile_count::zero ());
+	return this->nonzero_p ();
       gcc_checking_assert (compatible_p (other));
       return initialized_p () && other.initialized_p () && m_val > other.m_val;
     }
@@ -868,7 +868,7 @@ public:
       if (*this == profile_count::zero ())
 	return true;
       if (other == profile_count::zero ())
-	return (*this == profile_count::zero ());
+	return !this->nonzero_p ();
       gcc_checking_assert (compatible_p (other));
       return m_val <= other.m_val;
     }
@@ -879,7 +879,7 @@ public:
       if (other == profile_count::zero ())
 	return true;
       if (*this == profile_count::zero ())
-	return !(other == profile_count::zero ());
+	return !other.nonzero_p ();
       gcc_checking_assert (compatible_p (other));
       return m_val >= other.m_val;
     }
-- 
2.14.4.44.g2045bb6

