From 19849d1585d6ff2cef5f495a93699703cf18b335 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 7 Oct 2019 11:53:40 +0000 Subject: [PATCH] * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. From-SVN: r276655 --- gcc/ChangeLog | 4 ++++ gcc/ipa-prop.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83ad0017b5a..db122e24c47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2019-10-07 Aldy Hernandez + + * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. + 2019-10-07 Aldy Hernandez * ipa-prop.c (ipa_vr::nonzero_p): New. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 20a0bddcbab..5020f4a44d5 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -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)))); } -- 2.30.2