From patchwork Thu Dec 21 10:21:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 182142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp312045dyi; Thu, 21 Dec 2023 02:21:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEybyhnwh5G9jNO5Z+FIvqe6fAkXdkmTIfiQOVkNUqXxBL0gz3hXF4GDVxEM8SfF0rc6CN2 X-Received: by 2002:ae9:c013:0:b0:77f:395c:3794 with SMTP id u19-20020ae9c013000000b0077f395c3794mr23766830qkk.106.1703154108979; Thu, 21 Dec 2023 02:21:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703154108; cv=pass; d=google.com; s=arc-20160816; b=BnKEKa+H9vdL2ZaL/BGr9V5HWUQ/uZkzy+71HsN+jzuVWqKAHKZqY1a8A1awCJVjXW z8eowqJPPErl6UAj4AJYgmIebuAY2ZG3m33MR1fJTsi3KrpSIaQsLJ/u+Ss1g6ZHESsT W/KDBmFLcWNo6lB0QyDuPsukWjvg86nKckbY2I1i48F5EEg3rlyNKdd9aSeyN9Qr69mX gzEVErYy/aAiWZ0KHQtcrP/SC6vJSmHwtEQMV5yOZq5P6lX59fkNC6IfTGY3lnB3YViQ pOgz8YNjizVGWe9f3efshT2nDemdtqCivdYAlMz5d5KQWvy7oZEaTITwoWmvuhhziiuQ TYgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:mail-followup-to:to:from:arc-filter :dmarc-filter:delivered-to; bh=X6eMb9iPMUuqbzV+kLoEieybnJ4KbmNJozRydsY4u1M=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=YEsd+Rmp0VE4QjeSaD4M3SXzYu1LbtKH6R+zx+zhwrOYm0nf/+CtKD3eQ+0eBiueot JU2JWJiIG+XV5qQ+V1RGeMuayQGG1RslqmZhj/jMiiiaVjB3ybVegY/7pxPRhcWY6dh/ i5Av9lomVSV1RSBOLhhteQz48R1zPLzfcU0LNqFDugKkGmbrUKhkm/Ixy4Q/m9Ga2+Yt ZTT3HhFkAf5/vFKyG1XVddylsGpIzwP3PTfegqsvAEY9PSL3IOqbT6ialWOTZZxolyfA 32LYAuDgB4rS236kYRg8oMiMKMaEZvCy6G1DU7BfC4ruBdPj6zv4FE8YkqQSdx2l2JHg AfRg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d20-20020a05620a137400b0077dbbbf53a6si1775127qkl.557.2023.12.21.02.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:21:48 -0800 (PST) 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; arc=pass (i=1); 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A946D38618AF for ; Thu, 21 Dec 2023 10:21:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 1B2343858D35 for ; Thu, 21 Dec 2023 10:21:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B2343858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1B2343858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703154086; cv=none; b=fsTI2U8W7f1JsUZEjrYr7DGQC3fg7jS8JaE9u7qirjyUu/i5SViFx+SyBT660V4yp8U68ILH6plqlCmWUxXnAjjpj1xf5sLkJ6mZ6j57IaaXTFuu0Q5HDohk3V1k0M4DvRjye7PgMQNjz4RlW6xHDr+SPdzDacrI5heR7nsFWbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703154086; c=relaxed/simple; bh=yIxh2jSDfrXl+HlcqZJB3KqvzbIj6ym4QX5S+Tm3zFg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=f2inBaxrOhXfXSM9irl/Frb66U0iKqHzwzITQ9FXCVVAer9V0aXCS+j5gFpVU7Yf3Ar4dWjFkxjgfCNdHqMabVWhq0bzvMeyJoo/qopDJ8Kwc0rUm8LcD8tZ2o4teRzMM8r98H1+DJ6Zchj7hRaHNuc0tk8NAZ6iXCXccGUZ5ZQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85EAB2F4 for ; Thu, 21 Dec 2023 02:22:09 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 566243F5A1 for ; Thu, 21 Dec 2023 02:21:24 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [pushed] aarch64: Fix cut-&-pasto in early RA pass [PR112948] Date: Thu, 21 Dec 2023 10:21:23 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-21.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785886522985750086 X-GMAIL-MSGID: 1785886522985750086 As the PR notes, there was a cut-&-pasto in find_strided_accesses. I've not been able to find a testcase that shows the problem. Tested on aarch64-linux-gnu & pushed. Richard gcc/ PR target/112948 * config/aarch64/aarch64-early-ra.cc (find_strided_accesses): Fix cut-&-pasto. --- gcc/config/aarch64/aarch64-early-ra.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/aarch64/aarch64-early-ra.cc b/gcc/config/aarch64/aarch64-early-ra.cc index 484db94513d..24415bd829c 100644 --- a/gcc/config/aarch64/aarch64-early-ra.cc +++ b/gcc/config/aarch64/aarch64-early-ra.cc @@ -2072,8 +2072,8 @@ early_ra::find_strided_accesses () if (group1->strided_polarity) group2->strided_polarity = group1->strided_polarity * pref; - else if (group1->strided_polarity) - group2->strided_polarity = group1->strided_polarity * pref; + else if (group2->strided_polarity) + group1->strided_polarity = group2->strided_polarity * pref; else { group1->strided_polarity = 1;