Do not compare incompatible ranges in ipa-prop.
authorAldy Hernandez <aldyh@redhat.com>
Sat, 1 Oct 2022 20:20:49 +0000 (22:20 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 3 Oct 2022 11:06:25 +0000 (13:06 +0200)
gcc/ChangeLog:

* ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Do not compare
incompatible ranges in ipa-prop.

gcc/ipa-prop.cc

index ca5b9f3..724c945 100644 (file)
@@ -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