From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2136) id 77A4F383600B; Mon, 1 May 2023 06:33:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77A4F383600B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682922838; bh=9QGvTWLWMOrlRQjAwtkVt2l0vMqxSCVW1WXWgjEt+/s=; h=From:To:Subject:Date:From; b=X8aGM7cpitoDdGtDchdZwXEoIqqunn6cuTdCJr7+VSP12AbU1C2PuWC1y+7cQmfzi CntEUQ7v0XK20ZTaWPCZwdOn3053j6QBQ6EdqIXarbENbJB1ir0SQDMfiSA0CMLDar pwgHBLXbtzXXNwiW2UwmoXn3PlLUMUEw/DCD8KKM= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Aldy Hernandez To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-372] Convert get_legacy_range in bounds_of_var_in_loop to irange API. X-Act-Checkin: gcc X-Git-Author: Aldy Hernandez X-Git-Refname: refs/heads/master X-Git-Oldrev: c7422782a2e506d6ef8bf68c83becc41d523d810 X-Git-Newrev: 2c39e0fabff4de3cedd82beb03b4e1987e273a33 Message-Id: <20230501063358.77A4F383600B@sourceware.org> Date: Mon, 1 May 2023 06:33:58 +0000 (GMT) List-Id: https://gcc.gnu.org/g:2c39e0fabff4de3cedd82beb03b4e1987e273a33 commit r14-372-g2c39e0fabff4de3cedd82beb03b4e1987e273a33 Author: Aldy Hernandez Date: Wed Jan 25 12:59:50 2023 +0100 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: --- gcc/vr-values.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index 7f623102ac6..3d28198f9f5 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