From 5220219922c41dd574de83f3334b2ca5db9a722d Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Tue, 4 Aug 2020 06:58:26 +0200 Subject: [PATCH] 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. --- gcc/vr-values.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/vr-values.c b/gcc/vr-values.c index 609375c072e..1190fa96453 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 -- 2.30.2