From: Aldy Hernandez Date: Wed, 25 Jan 2023 11:59:50 +0000 (+0100) Subject: Convert get_legacy_range in bounds_of_var_in_loop to irange API. X-Git-Tag: basepoints/gcc-15~9767 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c39e0fabff4de3cedd82beb03b4e1987e273a33;p=thirdparty%2Fgcc.git Convert get_legacy_range in bounds_of_var_in_loop to irange API. gcc/ChangeLog: * vr-values.cc (bounds_of_var_in_loop): Convert to irange API. --- diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index 7f623102ac61..3d28198f9f5d 100644 --- a/gcc/vr-values.cc +++ b/gcc/vr-values.cc @@ -331,13 +331,16 @@ bounds_of_var_in_loop (tree *min, tree *max, range_query *query, || initvr.undefined_p ()) return false; - tree initvr_min, initvr_max; + tree initvr_type = initvr.type (); + tree initvr_min = wide_int_to_tree (initvr_type, + initvr.lower_bound ()); + tree initvr_max = wide_int_to_tree (initvr_type, + initvr.upper_bound ()); tree maxvr_type = maxvr.type (); tree maxvr_min = wide_int_to_tree (maxvr_type, maxvr.lower_bound ()); tree maxvr_max = wide_int_to_tree (maxvr_type, maxvr.upper_bound ()); - get_legacy_range (initvr, initvr_min, initvr_max); /* Check if init + nit * step overflows. Though we checked scev {init, step}_loop doesn't wrap, it is not enough