From patchwork Wed May 10 00:33:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 91784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3270070vqo; Tue, 9 May 2023 17:34:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51r3nSgcIGm2rqg39nSYNUd8kNAMIsRlVPXRPuRtepKz01uvymzlCDT1RfupomOW3mOl7e X-Received: by 2002:a05:6402:c9:b0:50b:c630:a956 with SMTP id i9-20020a05640200c900b0050bc630a956mr12221181edu.17.1683678896417; Tue, 09 May 2023 17:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683678896; cv=none; d=google.com; s=arc-20160816; b=Hf8dtVGHkcIef2niXCrPyo3AlSFBwsGwyLeSWEzD9UqwR6TJlWtHLYY+ArX6Wj/XIp 5ySjyCw++QUQtJGwzbhithsvhp6y9fQgtQo4egQRgR66pwtB8Oq2akvtj1RknYKEA34h AjcrfsrBkFqm1LrnLaBI/VCn8E7A9hJVfgI1gARTE1leR4Ltn0w+N9ngvA+w8qFZmWBq h73Xo2FHa9wtxzE90dmCq7UQADbx9YgOinL9AuotcyZMZU8x9TLlE8/vL8YoZ+pYaIQ5 oKxFlyVlZCuBlknVNLP3IgNX6T8g0Km32MtJnGEJ+3vPOclh9lhTvuNa3XFq4rYZs64I jPZg== 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:date:message-id :content-transfer-encoding:mime-version:subject:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=J+WLEBV9A2pbTrsF12RwUIBz7YSnkDklNYfqk3YlMEY=; b=Oum5Udk2UJrdH9YsrlSn6KqbeTNQV6bItuKR7KJ5YuRFef9XYUm8ANrXFqem7eSl/k QYNl+CK9mJoyaCeSLrineOvmysaAE9BX+ZFAcPsiCRZqsvhoX81tJdV7fwrE66JXklTv +yPBwc/PqC6G1VXJgEWCEKwUnmedyoCaRLkaRhW9ncLwbbUwRuDxUEreML0L5DTKbEeo +owlFXLqAxMAEjX7yucaSOAB8X56EGoPVnhb9geWeKZFTqMXvMuzGqoVIhE8WwCKpoqd xVjP7NnKjIBcvV1kSsAWjmhBEz2ZaGZnPjoHKvm1ytz7AuInD5enHb6QFSQiQ23EekFt f8Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=n7G2c75W; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id l11-20020a056402124b00b0050ba551ed3csi1962421edw.414.2023.05.09.17.34.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 17:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=n7G2c75W; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 1DDCF385773E for ; Wed, 10 May 2023 00:34:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1DDCF385773E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683678889; bh=J+WLEBV9A2pbTrsF12RwUIBz7YSnkDklNYfqk3YlMEY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=n7G2c75W9ktQTj+hi1xV+90JY7T5PZTgPxc5Gx6jSR8Nqx/Hz9Fhz2XRbIL4LMAEh hSAsVbL2xyyPQwX6anSttkTV53gRvTRWjwtobPn4psDb91fHj2Nl42tejBBDpf4e84 TFa4oGOJ6jFAVVm/L5QMCTs/xrRg7M6Xo4KG6GGI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by sourceware.org (Postfix) with ESMTPS id 00DE9385843A for ; Wed, 10 May 2023 00:33:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00DE9385843A To: Subject: [committed] CRIS: Fix ccmode typo in cris_postdbr_cmpelim MIME-Version: 1.0 Message-ID: <20230510003326.8B65620423@pchp3.se.axis.com> Date: Wed, 10 May 2023 02:33:26 +0200 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, 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: Hans-Peter Nilsson via Gcc-patches From: Hans-Peter Nilsson Reply-To: Hans-Peter Nilsson 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?1765465282217772669?= X-GMAIL-MSGID: =?utf-8?q?1765465282217772669?= Typo spotted while doing CCmode improvements, as a missed optimization. It's almost visible from the patch context; there's not much done in terms of "mode-adjustment" when replacing (reg:CC CRIS_CC0_REGNUM) with a copy! This bug affects functions in the newlib printf-formatting functions (nothing else in libgcc or newlib libc), with the performance impact on coremark scores being less than 1e-6 (3/5078992 cycles, 6/48543 bytes). * config/cris/cris.cc (cris_postdbr_cmpelim): Correct mode of modeadjusted_dccr. --- gcc/config/cris/cris.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc index 05dead9c0778..5b4cc4e204eb 100644 --- a/gcc/config/cris/cris.cc +++ b/gcc/config/cris/cris.cc @@ -432,7 +432,7 @@ cris_postdbr_cmpelim () machine_mode ccmode = GET_MODE (src); rtx modeadjusted_dccr = (ccmode == CCmode ? dccr - : gen_rtx_REG (CCmode, CRIS_CC0_REGNUM)); + : gen_rtx_REG (ccmode, CRIS_CC0_REGNUM)); rtx compare /* We don't need to copy_rtx pat: we're going to delete that insn. */