From patchwork Fri Oct 4 15:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 1992789 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=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XKtS34pjjz1xt7 for ; Sat, 5 Oct 2024 01:55:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CBD0A386F465 for ; Fri, 4 Oct 2024 15:55:44 +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 3231A385E011 for ; Fri, 4 Oct 2024 15:55:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3231A385E011 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 3231A385E011 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=1728057324; cv=none; b=H7kRTApSZafvUcf0tNtFIMoNiz8zZW4eFy7RaMvwqpZl/16YaCI5J2SZMpkCjo18BH1z9YKmvrvJ6ZTHdWuBhxCePHz04bsWeglzSUflrGsabXXFG0bTFKeyiZrmGyLbbUt/FMUSymYQvddT8e4hHAjXlkH0tD6ofExhgDT/olA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728057324; c=relaxed/simple; bh=da4B8bHMp1ogfvzxlvSREkLZcCXTjussyLn0JwR7yfo=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=Ucxb+F/xH837Wbq+3gcLfrdq4y1wx2AlcXEU8of/BincRe7Yp5GfKjWk/dqfDRFuFTCpWgey+0AmIh3fJcc5JnIi8V7cDiNzXGh5rNpZwGv9h5OxVOY+yDtE35/ZmbrzLfXLahK8/R2Ze/ZOwxQrdatRQuuJGUHAg/XuXFxQFzw= 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 5ED3F339; Fri, 4 Oct 2024 08:55:52 -0700 (PDT) Received: from [10.57.21.64] (unknown [10.57.21.64]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0EC763F640; Fri, 4 Oct 2024 08:55:21 -0700 (PDT) Message-ID: <2f10481d-0beb-4cc8-9230-610de2a76937@arm.com> Date: Fri, 4 Oct 2024 16:55:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Cc: Ramana Radhakrishnan , =?utf-8?q?Torbj=C3=B6rn_SVEN?= =?utf-8?q?SSON?= From: "Andre Vieira (lists)" Subject: arm: Make arm_noce_conversion_profitable_p call default hook [PR 116444] X-Spam-Status: No, score=-12.5 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 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~incoming=patchwork.ozlabs.org@gcc.gnu.org Hi, The patch for 'arm: Fix missed CE optimization for armv8.1-m.main [PR 116444]' introduced regressions with arm targets that used 'noce' before. This is because it would approve all noce optimisations without using the default cost check. Not sure why this didn't show up in my original testing, I suspect you need to test this for a set of specific targets like Torbjorn did, thank you for pointing these issues out to me. Could I ask you to rerun them with this patch? I'll try to do that locally too. Happy to receive reviews, but I'm waiting for Torbjorn and my own testing to complete before committing. When not dealing with the special armv8.1-m.main conditional instructions case make sure it uses the default_noce_conversion_profitable_p call to determine whether the sequence is cost effective. gcc/ChangeLog: PR target/116444 * config/arm/arm.cc (arm_noce_conversion_profitable_p): Call default_noce_conversion_profitable_p when not dealing with the armv8.1-m.main conditional instructions special cases. diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 077c80df4482d168d9694795be68c2eeb8f304d9..fd437f428781673e1d44498d31a47f174e0f57fa 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -36168,7 +36168,7 @@ arm_noce_conversion_profitable_p (rtx_insn *seq, struct noce_if_info *if_info) { if (!TARGET_COND_ARITH || reload_completed) - return true; + return default_noce_conversion_profitable_p (seq, if_info); if (arm_is_v81m_cond_insn (seq)) return true;