From: Aldy Hernandez Date: Tue, 4 Aug 2020 04:58:26 +0000 (+0200) Subject: Adjust op_with_boolean_value_range_p for irange API. X-Git-Tag: upstream/12.2.0~14424 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5220219922c41dd574de83f3334b2ca5db9a722d;p=platform%2Fupstream%2Fgcc.git Adjust op_with_boolean_value_range_p for irange API. gcc/ChangeLog: * vr-values.c (simplify_using_ranges::op_with_boolean_value_range_p): Adjust for irange API. --- diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 609375c..1190fa9 100644 --- a/gcc/vr-values.c +++ b/gcc/vr-values.c @@ -448,10 +448,11 @@ simplify_using_ranges::op_with_boolean_value_range_p (tree op) if (TREE_CODE (op) != SSA_NAME) return false; + /* ?? Errr, this should probably check for [0,0] and [1,1] as well + as [0,1]. */ const value_range *vr = get_value_range (op); - return (vr->kind () == VR_RANGE - && integer_zerop (vr->min ()) - && integer_onep (vr->max ())); + return *vr == value_range (build_zero_cst (TREE_TYPE (op)), + build_one_cst (TREE_TYPE (op))); } /* Extract value range information for VAR when (OP COND_CODE LIMIT) is