diff mbox series

[COMMITTED] Do not compare nonzero masks for varying.

Message ID 20221003110815.1075975-2-aldyh@redhat.com
State New
Headers show
Series [COMMITTED] Do not compare nonzero masks for varying. | expand

Commit Message

Aldy Hernandez Oct. 3, 2022, 11:08 a.m. UTC
There is no need to compare nonzero masks when comparing two VARYING
ranges, as they are always the same when range types are the same.

gcc/ChangeLog:

	* value-range.cc (irange::legacy_equal_p): Remove nonozero mask
	check when comparing VR_VARYING ranges.
---
 gcc/value-range.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 6154d73ccf5..ddbcdd67633 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -1233,10 +1233,7 @@  irange::legacy_equal_p (const irange &other) const
   if (m_kind == VR_UNDEFINED)
     return true;
   if (m_kind == VR_VARYING)
-    {
-      return (range_compatible_p (type (), other.type ())
-	      && vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask));
-    }
+    return range_compatible_p (type (), other.type ());
   return (vrp_operand_equal_p (tree_lower_bound (0),
 			       other.tree_lower_bound (0))
 	  && vrp_operand_equal_p (tree_upper_bound (0),