From patchwork Tue Jul 26 18:38:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 192 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp2430658pxt; Tue, 26 Jul 2022 11:38:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1teZu/9rs2THVh2psxBF90hMT7unnTQRTLXs7SLrIQYRzH1vReoJ8aOG98n8MnqYcbyeZPw X-Received: by 2002:a05:6402:348e:b0:43c:37a:26d with SMTP id v14-20020a056402348e00b0043c037a026dmr11039595edc.279.1658860717156; Tue, 26 Jul 2022 11:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658860717; cv=none; d=google.com; s=arc-20160816; b=tK7I3INJ6fTIlpr4V21Mhf3ro/Cb1FdNZpkknsFpklvSRWGedJy+4MBPnUlSo2WpHO zLjqHvtBrzsSTzzAxtYDBhz8gMLAV7ojvzVpvri1D5XBhmIE+qZlHJ5yy3zWBdVg4eaO B0bvarMI0cywzIKfJGT19VCKPNX1/c79HNgr38floTTPOdyO3RKjvEbhFMXxxkmmrWRv A8XUw8ROaBtPH2vWKjYfdwXT279nZepx0bca+4Nq2Csd0/gCwDmPx2qYXK71zq+7EbkZ rWMDacSBSLhArfPm52KB8pZov2+LNBBMBgPb2hO9kMlJJ8PngafSkqtTZuS4losVav7x pRsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:subject:to:from:date:dkim-signature:dmarc-filter :delivered-to; bh=JmXsuD1YIa4ZBPjHa1sjxkSvvHvSdwFb0+syuSnCruQ=; b=cJF1ltPh7Xm7POlIE9sbgpdgoqkcZwOBXRkBBHdhlYCGgQGPJvJVG16lMYZRx98XLr Fe/h6tuRcb9hkf63dqGkOKyCRn+PwgOxwyBaFdiqrV4xXLfI0yvGSKGMY35JFJy4GKLM AHQntEMB18gPxhv2+D+4NlcTNZVLKVWpvajHUF5720eyprGaWXaP7tF5XgPZdHaaNoNk 7osVIlTQCVIJs9y/atBwi/Wz9PnDxLYWthMeD9o3y20w8gzT65XmdsIVXPfFbeomHUrd RtVqoczUWme4gQvC+vQwN3WzpusyqiCDQDti5DErlEV3/+gHBuTu7HBGv596OywaEpxY S6qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embecosm.com header.s=google header.b=Oc8nyQg8; 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ga36-20020a1709070c2400b0072ee50dd4e6si3128018ejc.470.2022.07.26.11.38.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 11:38:37 -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=fail header.i=@embecosm.com header.s=google header.b=Oc8nyQg8; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 874BC3857BBA for ; Tue, 26 Jul 2022 18:38:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 68B7B3858D32 for ; Tue, 26 Jul 2022 18:38:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 68B7B3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-lf1-x12a.google.com with SMTP id b16so11396689lfb.7 for ; Tue, 26 Jul 2022 11:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=JmXsuD1YIa4ZBPjHa1sjxkSvvHvSdwFb0+syuSnCruQ=; b=Oc8nyQg8WF93ojd/TsX976XzxrIqurWsy0LUaQewN5OdEWeuOhBLVRkF2tGBF07zdW pVmCKAm2hGUNnVS96WIjrfId5luJ6fxXLuSKdPDCFIv68C6XfzoJ65hdKz5k7wrFH1cu vbe7DvBe7lv9G5YglaNlnPFyra1DdgZ28udXpPwj/0oyrCUGU3bl09zTZENMubEIn9OV 0jj9Hzk1fHNjpY6XrnHwDKWeIAAy+bugQGJIVFSMQk4cRAiIQLpBhAJJGQ+pM0GXtvV7 LOCwSqQP42VZPGdoIo7ArqElPKXGwUCI9KyO8mD+ruJzLglk34dVdS0R7YNm/3x+X/ir Qz+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=JmXsuD1YIa4ZBPjHa1sjxkSvvHvSdwFb0+syuSnCruQ=; b=33Rs8I8YJwFKTBSL6Rdd5IXCEOoQBcFxTVHq1GgSONwfMDHxjA9m3n0se34tf7oX4i Ajw/s2/SaRZrm6zxPEo61OTLSZuyDESQ/j3ffFkM91z3G3y5irBZ5rEVft/oS9nM6xHp 3oML8gNv3og+n6To8TQ3TNtJzuAy6KvSJ6ReDYbzTDmQ7lhJ+MOSaRNFgRa/P94fSqf9 3Q0GN2WN2HsNMSq8gbLCH+7D4OwTsrOX791ovzgd1Yo8tPIEqAxA3qMyF89iAVIEHiup HuFV5zwOGZNBox5jcMUbtzF2h7vSk2kuJztZTWmr7/M6JAIoltbLiaFLA0kvhGCRYLLX QtuQ== X-Gm-Message-State: AJIora/gxWTOcqRcpNwc3lzifLKQv4gkhDO4PFcECRiAGMfUtMeeUoma YGfBa8dTaFhsAOJ2whaEB318UZBPmFXDOoF2 X-Received: by 2002:a05:6512:39c4:b0:48a:74b0:d350 with SMTP id k4-20020a05651239c400b0048a74b0d350mr6525640lfu.426.1658860686897; Tue, 26 Jul 2022 11:38:06 -0700 (PDT) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id g18-20020ac24d92000000b0048a7c1bed52sm2339150lfe.87.2022.07.26.11.38.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jul 2022 11:38:06 -0700 (PDT) Date: Tue, 26 Jul 2022 19:38:01 +0100 (BST) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V: Standardize formatting of SFB ALU conditional move Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: , Cc: Kito Cheng , Andrew Waterman 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?1739441535365852927?= X-GMAIL-MSGID: =?utf-8?q?1739441535365852927?= Standardize the formatting of SFB ALU conditional move operations from: beq a2,zero,1f; mv a0,zero; 1: # movcc to: beq a2,zero,1f # movcc mv a0,zero 1: for consistency with other assembly code produced. No functional change. gcc/ * gcc/config/riscv/riscv.md (*movcc): Fix output pattern formatting. --- Hi, No regressions in `-mtune=sifive-7-series' testing except for: FAIL: gcc.target/riscv/pr105314.c -O0 scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -O1 scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -O2 scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -O3 -g scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -Os scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -O2 -flto -fno-use-linker-plugin -flto-partition=none scan-assembler-not \tbeq\t FAIL: gcc.target/riscv/pr105314.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects scan-assembler-not \tbeq\t as expected due to the brokenness of the test case, as discussed here: (still unresolved). OK to apply? Maciej --- gcc/config/riscv/riscv.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) gcc-riscv-movcc-format.diff Index: gcc/gcc/config/riscv/riscv.md =================================================================== --- gcc.orig/gcc/config/riscv/riscv.md +++ gcc/gcc/config/riscv/riscv.md @@ -2187,8 +2187,8 @@ (match_operand:GPR 4 "sfb_alu_operand" "rJ,IL")))] "TARGET_SFB_ALU" "@ - b%C5 %1,%z2,1f; mv %0,%z4; 1: # movcc - b%C5 %1,%z2,1f; li %0,%4; 1: # movcc" + b%C5\t%1,%z2,1f\t# movcc\;mv\t%0,%z4\n1: + b%C5\t%1,%z2,1f\t# movcc\;li\t%0,%4\n1:" [(set_attr "length" "8") (set_attr "type" "sfb_alu") (set_attr "mode" "")])