From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682922556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w6uRd7VA/7ykZKRdt+2PVKMU2o1Uo4Gs/SRFPuV+WRY=; b=KftYwuybOiAyP7ISndF6WHMPWcVQYMN3zqM4dx4fjqlSkKvCv389Rwt2m0ZWmMmTURu0L7 8Jms45QOHhUxyd9mAI7msFJtaZxt10P2zNuP8q5UaxGRz/oqs1pLDZp+Eb4YG4yKFuhrGJ Tl7NcD/ShKV18vmEN2McTlGkAcfjYK0= 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 From: Aldy Hernandez 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 List-Id: 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 -- 2.40.0