* ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check.
authorAldy Hernandez <aldyh@redhat.com>
Mon, 7 Oct 2019 11:53:40 +0000 (11:53 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 7 Oct 2019 11:53:40 +0000 (11:53 +0000)
From-SVN: r276655

gcc/ChangeLog
gcc/ipa-prop.c

index 83ad0017b5aefd3ea0e5f7792ebf2e9ce6d28c86..db122e24c475727234e5d75ad2d0e45bbbe05b24 100644 (file)
@@ -1,3 +1,7 @@
+2019-10-07  Aldy Hernandez  <aldyh@redhat.com>
+
+       * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check.
+
 2019-10-07  Aldy Hernandez  <aldyh@redhat.com>
 
        * ipa-prop.c (ipa_vr::nonzero_p): New.
index 20a0bddcbab9c21d562cb51f2fb1f8afd99869e3..5020f4a44d5afce521c65cd703d2eae7e3e11b6a 100644 (file)
@@ -5117,6 +5117,7 @@ ipa_vr::nonzero_p (tree expr_type) const
 
   unsigned prec = TYPE_PRECISION (expr_type);
   return (type == VR_RANGE
+         && TYPE_UNSIGNED (expr_type)
          && wi::eq_p (min, wi::one (prec))
          && wi::eq_p (max, wi::max_value (prec, TYPE_SIGN (expr_type))));
 }