From: Aldy Hernandez Date: Mon, 7 Oct 2019 11:53:40 +0000 (+0000) Subject: * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. X-Git-Tag: upstream/12.2.0~21349 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19849d1585d6ff2cef5f495a93699703cf18b335;p=platform%2Fupstream%2Fgcc.git * ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check. From-SVN: r276655 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83ad001..db122e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 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. (ipcp_update_vr): Use nonzero_p instead of open-coding check for non-zero range. diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 20a0bdd..5020f4a 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)))); }