Commit 19849d15 by Aldy Hernandez Committed by Aldy Hernandez

* ipa-prop.c (ipa_vr::nonzero_p): Add TYPE_UNSIGNED check.

From-SVN: r276655
parent 523fe5b6
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.
(ipcp_update_vr): Use nonzero_p instead of open-coding check for
non-zero range.
......
......@@ -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))));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment