diff mbox series

[COMMITTED] Do not compare incompatible ranges in ipa-prop.

Message ID 20221003110815.1075975-1-aldyh@redhat.com
State New
Headers show
Series [COMMITTED] Do not compare incompatible ranges in ipa-prop. | expand

Commit Message

Aldy Hernandez Oct. 3, 2022, 11:08 a.m. UTC
Committed as obvious.

gcc/ChangeLog:

	* ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Do not compare
	incompatible ranges in ipa-prop.
---
 gcc/ipa-prop.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index ca5b9f31570..724c9456308 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -126,8 +126,8 @@  struct ipa_vr_ggc_hash_traits : public ggc_cache_remove <value_range *>
   static bool
   equal (const value_range *a, const value_range *b)
     {
-      return (*a == *b
-	      && types_compatible_p (a->type (), b->type ()));
+      return (types_compatible_p (a->type (), b->type ())
+	      && *a == *b);
     }
   static const bool empty_zero_p = true;
   static void