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: 1775420 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=WGSPw9YE; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q8tfQ63xQz1ydX for ; Mon, 1 May 2023 16:31:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DE16E3882ADA for ; Mon, 1 May 2023 06:31:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE16E3882ADA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682922716; 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=WGSPw9YEzOWDOoehYJ8sZDLEF/EhiZ8Typ/AyRUzWnXdZDiwAQjopvOdWZf129Alj XJz2RFvnl5+/HgZ7otpD/bE85sHZcItNuqSuLj9CMUgOpN3RQEAuse2T17JPhCx5/2 U2BTS27EZEJbQbw0jbfCmc/M2rp5reHZAeO1UGnY= 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+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" 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