From patchwork Wed Dec 20 08:39:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Pengcheng X-Patchwork-Id: 181531 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2498455dyi; Wed, 20 Dec 2023 00:40:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDNfKjSSMxXgh0nuYf4SgjdXMXC8Q5Z2io96MsL+Hlh8bKiCpwPfeZr3Vbd1K3tQbMfs0r X-Received: by 2002:a05:6214:246f:b0:67f:5a4a:23f8 with SMTP id im15-20020a056214246f00b0067f5a4a23f8mr4002002qvb.40.1703061607108; Wed, 20 Dec 2023 00:40:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703061607; cv=pass; d=google.com; s=arc-20160816; b=wD5XMdrXWES82ze6bZQDYIF/m2JiwErk+M8cuZxce0UigEsIAjdHWjQbId7/GmzMGo p8tCt1qaZV9TMHp7OXTepvHBzFdyXg8TbMRGhxGow2RVLHId7B3MjDMQtoFdAfSjLqen 0PP9KVmPLJWXoLjPMNMFQF0SPyZzDk02BY8RkQLqWt13VrSgft67v9WMvZcOG85QH3BX Tr43cjJajUzlhIDohLKqqxT2q84K4oyhB5U+c6DMALN4oaPXzJyg9bqOxHz1Hb4Lxmso eGEOdWZ0PID2EKgansTIGbuKo0E+swsipQbG3q559XyXcGdJ1qfXf5X+EoVPFXcWZYdY 7fUA== 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:cc:to:subject:message-id:date :from:mime-version:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=XJ5X9YhnZDvfCHq/ed+YAqS94EtFTOkIg3qpN+qLy8w=; fh=erRmcM7KKW2zEE0u8TMusj0zo93oaIoWKvSZU+JzfNo=; b=wDfczNkjLtNHqay9IYSUqmph6kzr9wgb+UuNGgAAiQWrN2rWo25Dl3AnqoGqXFa/0T BGZiGwMIpcJDmh1OIc/9X67kjnI2MhcadTA/LCe8skPfBWUP8WqhIkXV4NxqT/3ho+YD by42umgws83mn/MQEiiZtCoWRoRIkuv67X9Cem1b9E7TOhS2sFL4oeghrjvy4EJXDNP0 zexBlPmStFlbyMwzT+7Im3ejIcrWP7KRLhdOnmSVxa0F/MPpEWKzARahvikjL0EXDQZI yhrdITD9EtKmFCa1EGqR007nBf54R7ByTcVYQgmPhIm8f9BqKqXrou6MyzKfH/wYd3by CiDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=OlkBTYDo; arc=pass (i=1); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id wc9-20020a05620a720900b0077f0211c11csi2656964qkn.588.2023.12.20.00.40.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 00:40:07 -0800 (PST) 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=@bytedance.com header.s=google header.b=OlkBTYDo; arc=pass (i=1); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C92DA3860769 for ; Wed, 20 Dec 2023 08:40:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by sourceware.org (Postfix) with ESMTPS id C491F3858D20 for ; Wed, 20 Dec 2023 08:39:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C491F3858D20 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=bytedance.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C491F3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703061571; cv=none; b=TRhGP5HVTqIQeWCX/SJxSiLeOgTpdAxIb0xO9nWWj62D9AckT8vPw/Do9TTHspbhts6MQUQjxf2Cq8ZjsNNRSO9S/teqeUgEWIzJv2dNWcYzVhFQmX+G4C8ytllawXGoLSCqyDtthGroMEL9UWg1JqsaJNW1e5R69m/nZR0aRrI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703061571; c=relaxed/simple; bh=8jy0GWGE8caiJsdtC2D1lvTlaH6/CxRbGiCyrCwbu3g=; h=DKIM-Signature:Mime-Version:From:Date:Message-ID:Subject:To; b=OqMz/bAWLoM6QsEL2cBUh6idakYKyMZmEjNd5B1ST6/A6l/qpIH4oc0O4E+pCD+n9DQPEj/qxSw+rWod2aiA3KXkvCLfObK2fTW40yEY86CSMpx1VSXUZRENJi4umUvqv31KqZGwmVd/gZAeoG+P8Nt/gEDPMpKbGljwoYU4Zoc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1f03d9ad89fso3690199fac.1 for ; Wed, 20 Dec 2023 00:39:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1703061565; x=1703666365; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=XJ5X9YhnZDvfCHq/ed+YAqS94EtFTOkIg3qpN+qLy8w=; b=OlkBTYDoRsOKkGLp8rAZTxl6Lfwnu0wQ3ZwKtcGebAIY3MK1FeAJsVCwiElwDuv3k7 Vh6DeZJuEMDTvzY0rPtFgo9TAfzphL/SFt3pBzNVuhFDLxBFE5oTb7rEeLr1zqqbFfNi w7gcihw66QvpasFm/yM8V90JPCxRBmBkp20CneJEAovylTL6AOZ7HLeqfX2WNqF4/GAT 00FROD/xk6whaf3Esom9cexEZMl+FjT4lkQhft32fCHNw5kgh1fZWwB8dCauST+iEL+J 5T1Ib25eG6hJ/wDkUF1V+B76SY1BquYPX81a/2qlT/4s90ph9vpgHbPmUeq43YTcyr7l qUvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703061565; x=1703666365; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XJ5X9YhnZDvfCHq/ed+YAqS94EtFTOkIg3qpN+qLy8w=; b=hza1ncol9zRhq+xc8QUzjMNl9a5bBeJpnAW6ovVwlN6PgDf/be7brqGs4mQMQdejHx PURgZEvvUrwC93HXgPVpnUYzNUZtpLRW5TwIsTaHD674O4xmSOCQsmTChNX1eklZQxlU HQXGX63peUp/vqb2TeV/Ip4cVfUlWsQpppI7D9B3WtC4tR43cCVmClereWaPNUaWRaXD tUpzbfdCBIHyP3biTlsyVvToHjx8F19bma0WJhQiiwnm3goC5BWu5c9JH3CPHyX06VQ0 mN9ovzglVmGCiPdGC+6HRjfXOAKvGTNkDtFOtVpLvPevSL+Lei8RH5K8zgkT5Dh1aSg4 a7rw== X-Gm-Message-State: AOJu0Yx+y8RZRYVeZtEJOp6CmcyQDHwEwGs6o6jraF3JY+nQzfK80q+c LAeo2bVHlsrsWgT3D9vDChukv6FXJIcf0df2AcwL3xwWTaAITZxm X-Received: by 2002:a05:6870:b012:b0:1fb:75a:6d26 with SMTP id y18-20020a056870b01200b001fb075a6d26mr22917667oae.77.1703061565418; Wed, 20 Dec 2023 00:39:25 -0800 (PST) Received: from 44278815321 named unknown by gmailapi.google.com with HTTPREST; Wed, 20 Dec 2023 00:39:24 -0800 Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.windows.1 From: Wang Pengcheng X-Original-From: Wang Pengcheng Date: Wed, 20 Dec 2023 00:39:24 -0800 Message-ID: Subject: [PATCH] RISC-V: Fix RISCV_FUSE_ZEXTWS fusion condition To: gcc-patches@gcc.gnu.org Cc: wangpc X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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: 1785789527787884860 X-GMAIL-MSGID: 1785789527787884860 From: wangpc The condition is RISCV_FUSE_ZEXTH, which is a mistake. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_macro_fusion_pair_p): Fix condition. --- gcc/config/riscv/riscv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) prev (slli) == (set (reg:DI rD) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 8ae65760b6e..87a62119b01 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -8089,7 +8089,7 @@ riscv_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) return false; if (simple_sets_p && (riscv_fusion_enabled_p (RISCV_FUSE_ZEXTW) || - riscv_fusion_enabled_p (RISCV_FUSE_ZEXTH))) + riscv_fusion_enabled_p (RISCV_FUSE_ZEXTWS))) { /* We are trying to match the following: