From patchwork Mon Oct 3 11:08:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 1653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp893996wrs; Mon, 3 Oct 2022 04:10:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7+A3XSlnYBFfpprRcrXSHhFahK7skbvv4+bgHXBrmVix+iK3o4s1OQO1/o9JNT6vprxom+ X-Received: by 2002:a17:907:2cf0:b0:787:e52b:c21d with SMTP id hz16-20020a1709072cf000b00787e52bc21dmr13297032ejc.262.1664795421634; Mon, 03 Oct 2022 04:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664795421; cv=none; d=google.com; s=arc-20160816; b=zhW76Jcy3vRHtWyL61b06cFKCtMYNSrZrN+Us4JXbX5HnUraEgiN86ybH47i+hcsHa yaWVP9UU1/TVIftkFWNVYHzRKLKTspr8QC9FFWM8ozM3G2mYE5VNOmutLQxMe1U7DK9h VHkVuB0qP1aGSQ09diFlNOWoL293kU74mrNzU0+hgNjUgpZMXQN9Rd5UMRlIoG03bOi6 tUK2TbCcjEcFmx0fovSZyQHLUc3Ym2q54UcJhCpCkT/DVCzpOGJjQ5Azt1Qn1kOiZZGd 3oqWvFvGcBKJ125x4JIiZsL48juSS2HTFweEVDJVSYvCPLQafRgg+ZkzXoGk/Jfi91Bt 0E1Q== 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:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=+Ar7WgmZdVF9hK6pUBXC8O+J72RX1LI64b2EcLGNiMc=; b=INpBQLceOZNwPlZYfXb3CxJr0VI2hAsHYhbf8tD6NWk+aKp9Ssbyni+DO4eREPWsZ3 IKb6qIXDlcxcB6mGyAK88lW5wQXkl23PfMNiahTNuZWZ/BQlHqQOzF+mVGJtTcoMIR4k oCWWHjZXn3EfJC5DI7SN3r3YWZ8Xsadq8w4I5eDDQmCxgfqRcPMsHiIZZTLpsp8thX8e +Lw18SGq7t1HqBbKOFUNf87gg8pUIoByO9hLYA51KndGoPHa1k26XhCaRRWo0ggHI9k3 mtPpA2T0MEedI9qklX/0inaN3MFpfBj+UKXUw4Pv+mq6tNfPMiOfcmMhnZAhFjCmliAp aSCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="MNQDM/t4"; 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 u23-20020a50a417000000b00453e1a11542si6738675edb.493.2022.10.03.04.10.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Oct 2022 04:10:21 -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="MNQDM/t4"; 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 5DD103857C61 for ; Mon, 3 Oct 2022 11:10:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DD103857C61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664795402; bh=+Ar7WgmZdVF9hK6pUBXC8O+J72RX1LI64b2EcLGNiMc=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MNQDM/t4QLCVvE1F3IY47YHC+1iGc5/QpDLXEwjCL2MuCNOiTRW8/SNAWyamsX/Kj YBO0GjRsgIU2RQEhhoRofS1i3ABXLe04bgpsloqQPSGOEGrSX5VbZUCDEojIVuQ236 mqPjyS1XnJX2q00IdHBNrVZBQPJRwuGzZxmIaLfw= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id 607483858299 for ; Mon, 3 Oct 2022 11:08:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 607483858299 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-140-y3a4izSmP5WChq8KxP746Q-1; Mon, 03 Oct 2022 07:08:20 -0400 X-MC-Unique: y3a4izSmP5WChq8KxP746Q-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 A2D5E1019C8A for ; Mon, 3 Oct 2022 11:08:20 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.194.103]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 598102027062; Mon, 3 Oct 2022 11:08:20 +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 293B8Ij41075999 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 3 Oct 2022 13:08:18 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.17.1/8.17.1/Submit) id 293B8IYm1075998; Mon, 3 Oct 2022 13:08:18 +0200 To: GCC patches Subject: [COMMITTED] Do not compare nonzero masks for varying. Date: Mon, 3 Oct 2022 13:08:13 +0200 Message-Id: <20221003110815.1075975-2-aldyh@redhat.com> In-Reply-To: <20221003110815.1075975-1-aldyh@redhat.com> References: <20221003110815.1075975-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.5 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, SPF_HELO_NONE, SPF_NONE, TXREP 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?1745664523807591848?= X-GMAIL-MSGID: =?utf-8?q?1745664523807591848?= There is no need to compare nonzero masks when comparing two VARYING ranges, as they are always the same when range types are the same. gcc/ChangeLog: * value-range.cc (irange::legacy_equal_p): Remove nonozero mask check when comparing VR_VARYING ranges. --- gcc/value-range.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 6154d73ccf5..ddbcdd67633 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -1233,10 +1233,7 @@ irange::legacy_equal_p (const irange &other) const if (m_kind == VR_UNDEFINED) return true; if (m_kind == VR_VARYING) - { - return (range_compatible_p (type (), other.type ()) - && vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask)); - } + return range_compatible_p (type (), other.type ()); return (vrp_operand_equal_p (tree_lower_bound (0), other.tree_lower_bound (0)) && vrp_operand_equal_p (tree_upper_bound (0),