]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Convert get_legacy_range in bounds_of_var_in_loop to irange API.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 25 Jan 2023 11:59:50 +0000 (12:59 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Mon, 1 May 2023 06:29:24 +0000 (08:29 +0200)
gcc/ChangeLog:

* vr-values.cc (bounds_of_var_in_loop): Convert to irange API.

gcc/vr-values.cc

index 7f623102ac6106c90e70dd6f361e9c290100f3c6..3d28198f9f5d2f51ebc5baa185c3c7dcd687e4ca 100644 (file)
@@ -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