From patchwork Mon May 1 06:28:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 88977 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2511369vqo; Sun, 30 Apr 2023 23:35:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AZ0tjvg0ODdsUcCqV6YVA7D5e1bD+wueCZLSLsq1A1wXg11yjyY5owuIhb/T7TuvxIfQ3 X-Received: by 2002:aa7:c758:0:b0:50b:c3a0:40e5 with SMTP id c24-20020aa7c758000000b0050bc3a040e5mr2832712eds.21.1682922918397; Sun, 30 Apr 2023 23:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682922918; cv=none; d=google.com; s=arc-20160816; b=yNpZgUW8T3C05W+ULyBq0yavAL2Km1GmOgZphj50h8dxE9WH6bISgkMJBnnap8E24B OT7zp5VOyE8sM8OPNSbpgmHACyRv7Fxnid6QESRLXfKkawSVbcNbsHcgAlqb70hp95MC cpFIIPY9Zk6fXl0TuqIYLVP+ZALy0bZbp7ox6v4Z40CYC24tzpkg5iici7s2Qvqc2V7m GFPRgHKrWXKQQ4IQlGlu2MGRxlOECuYRvvCmaE5PxMWQP7f1ZowBSsHZanupIO42B1k5 uge8xWqMGXvLl1PCYTwqHb41LtvoMYpUwBCE12aYt9Oxnd1lVextMdsEd5m/YHew8dXy XbxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=w6uRd7VA/7ykZKRdt+2PVKMU2o1Uo4Gs/SRFPuV+WRY=; b=kOJnZRRPJx87u02hwiBpwc9gL0RrfjzxMK7rVdO6iRT/8LdikZ1s7wyUqYpBu1pt1F tc3sq1ZbRZ4gpQzdr7DQrZHgaEsgEZqESliF2J9NqShp+059pPBynMvrJD5TNs6trT8R G8N0FfJ5aPuQIByIMz9FThzO5VDhvbziCrAtJBJ+ofp76UuOywAYNHiW+D4HGJMBeweb n3XCfAXWmZ2SKv5aE3brZgxllmbgC5VmVvB48anoJ8JBc6Jhdksv6md5U5RCJdscEwEr WznlP6+KWmDO3dT67I++V2HWM6XylDq+//9FRshGEZrgeohTCM5KfXBvC0nRIeuQj8MG +T3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=s16yQLAJ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h14-20020aa7c94e000000b00509ddfba50dsi13224627edt.652.2023.04.30.23.35.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Apr 2023 23:35:18 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=s16yQLAJ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9262D385022A for ; Mon, 1 May 2023 06:32:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9262D385022A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682922742; bh=w6uRd7VA/7ykZKRdt+2PVKMU2o1Uo4Gs/SRFPuV+WRY=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=s16yQLAJxoMws4y/9hMAsOEXaFlPVdhBKy7OKni6NXJzgT16yVNe6BRqqUHdfwOID AjGAOLGIUlWQe/L3b7bp/0XUqnBhPtMXgeRQQlN+kVDzFNn8CjciH8Y80c7dbKiofj B9aUMrKv3iMrF5FydUwgsapKNu/EStLtOShf23WM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2F422385842B for ; Mon, 1 May 2023 06:29:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2F422385842B Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-mZZy93t3OsW40i_ENtxEDw-1; Mon, 01 May 2023 02:29:13 -0400 X-MC-Unique: mZZy93t3OsW40i_ENtxEDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6ECA73C0DDCD for ; Mon, 1 May 2023 06:29:13 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2707E2027043; Mon, 1 May 2023 06:29:13 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.17.1/8.17.1) with ESMTPS id 3416TBUt564857 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 1 May 2023 08:29:11 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 3416TBwE564856; Mon, 1 May 2023 08:29:11 +0200 To: GCC patches Cc: Andrew MacLeod , Aldy Hernandez Subject: [COMMITTED] Convert get_legacy_range in bounds_of_var_in_loop to irange API. Date: Mon, 1 May 2023 08:28:59 +0200 Message-Id: <20230501062906.564803-5-aldyh@redhat.com> In-Reply-To: <20230501062906.564803-1-aldyh@redhat.com> References: <20230501062906.564803-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Aldy Hernandez via Gcc-patches From: Aldy Hernandez Reply-To: Aldy Hernandez Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764672582031296967?= X-GMAIL-MSGID: =?utf-8?q?1764672582031296967?= gcc/ChangeLog: * vr-values.cc (bounds_of_var_in_loop): Convert to irange API. --- 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