Message ID | 20220806194046.19446-1-palmer@rivosinc.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:20da:b0:2d3:3019:e567 with SMTP id n26csp975191pxc; Sat, 6 Aug 2022 12:42:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR5GdAlqtUO5faVbP9nb6iSrnhOJhoif/7ziarsVlY6W52ejtl+tjtI6CB+dIjoq42IibYCX X-Received: by 2002:a17:907:6e17:b0:731:2426:f606 with SMTP id sd23-20020a1709076e1700b007312426f606mr2871008ejc.162.1659814940099; Sat, 06 Aug 2022 12:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659814940; cv=none; d=google.com; s=arc-20160816; b=vilMDODBQr3A2DIEccgIPPdvN/8Jl0PWIFJYXOyBtj9HaqS9UGzKLUPnf3+98d4jXE +jIkD43lsHVa3+9qYfjHZ41f/qY2QB06ALl61gpj+oEyGDMKiDc3v2ZEP8EznmM1ILVO DWF3KxsFlHKgU+Q6yFKHcmP6/8acAGw4wiQvev1F7ThUWLn8bZLhaCVqOEnHVa6osUBL mi8t92XrDkTc/iDr+7WLPs/D474PMAE2yp3MFj+ockfOt+V/2y/HiFn5rEb9c0pjnl/I VZyA2eoWAYgHQe64eSzkmGmDXVzNP8zLj2+zQEykTAaARE/3dFGLYmqsaY0tOBfmPp9N rqIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from :content-transfer-encoding:mime-version:message-id:date:subject :dkim-signature:dmarc-filter:delivered-to; bh=VtwIlaJwfENiJNIXsXANcfkaORnUd7wXiqxmKXo61gU=; b=0b99BzvAwCyxYyxkUjLUNjfIXCpX3HoTM2ZD0CLORtX1qyiSyegPUYtqonV4OxC0eg CIcKPq32LgX0l+mZ8vI6pDrmF0BcXWjvvnQRciRm/Oj3s+XmfPcSXK+Gq4vnU1HKTzWo MIfFI/QHGnsqRB0HrgKADeaE7MQ1H1Wm3d6fnOlwqlnPakEdQWJ8aR322vTz6/BJVpXu Bs5FwmHhSLStiLXY2go4f+5B6l9nMKOeeqQj0U4XQxSYsWkbgdQ1gurT3JainFXFCrlW 2rRzyJ2qvuGteVijCeUM9yEgTWnXjkfiEqKeILUYXXBNwlpz5S/oTkwtkXnyjHP4TgEM WRqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=hHHLnE5V; 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" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id i9-20020a05640242c900b0043ad32fcc93si3265701edc.565.2022.08.06.12.42.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Aug 2022 12:42:20 -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=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=hHHLnE5V; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7046D3858C2F for <ouuuleilei@gmail.com>; Sat, 6 Aug 2022 19:42:06 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id F3E243858D28 for <gcc-patches@gcc.gnu.org>; Sat, 6 Aug 2022 19:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F3E243858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x633.google.com with SMTP id m2so5373327pls.4 for <gcc-patches@gcc.gnu.org>; Sat, 06 Aug 2022 12:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc; bh=VtwIlaJwfENiJNIXsXANcfkaORnUd7wXiqxmKXo61gU=; b=hHHLnE5V6eRNW2RHA6GCkicp1NEcXR4/nQP4sNZk0j9QyTViJYBbe+3RbDHzjUi0h3 ZFIbjjh459jxBbMW5fc8CmcZ5TjuZkfkqGW67G7WeMOng2120tveoFBO7J3Gpt/cnT8z b1Fe/Z2UHcPQ7jp44dlUjsM1lkKsLnLKlRbXUCU17aCA/Wtzp4PqHsuYmvfqHxgZxlfL /uZFJTsa/MeQCJFGXdU2CfQgICEjNd4zdO/cgVXbFuU0ASWjiwi5XyENmeIpWN5bBNpU LKmVkFQ/sZTxdbJESZ2UENrtF9z7VKDqt7LGgivA3vEkEtYtk6iqBKM9ZI0VWol8k23x fV+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc; bh=VtwIlaJwfENiJNIXsXANcfkaORnUd7wXiqxmKXo61gU=; b=g2yBb0Mfo6yS22KE5bPqIYf07bfuiUfRC2KScsMzMx5dgfBFdKax4CtzXnS20Yi7kw wIU26A+Y+xvhHWS3d9lGnduC58QXLOyvstbs3e3mzTkCFwML0TtLu3jFMTzUvCgxoV1w EXQyl5RQvUTy8/6HE70hvmqyz+AbCuvoj2swE+7Gegv/macesu+yUz5nheQ3lWCf2KjL 5Pqq27lrnlxieg4NuOTBRTvXnDhLoCcGaJJ1SrQP8i/rAzCcPydu5bPnDmnlqtTi2Zah DkplFFWV0pJQbeDjVi2+vo9sOV18lEvTagiJGXttM3tGrAyNqI+WNbaddgnWxPeMlG5S ZVwQ== X-Gm-Message-State: ACgBeo39wjBRTWCMfXEut1y9kmj0EWFxHPUgpu4lqPMJIxGq+8y9JaA3 DXwxVJnziMWMH8N0KVDrhG/pIQ== X-Received: by 2002:a17:902:ce09:b0:16b:ec52:760b with SMTP id k9-20020a170902ce0900b0016bec52760bmr12133439plg.155.1659814901930; Sat, 06 Aug 2022 12:41:41 -0700 (PDT) Received: from localhost ([50.221.140.186]) by smtp.gmail.com with ESMTPSA id h7-20020a170902680700b0016a111c83cdsm5419858plk.119.2022.08.06.12.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Aug 2022 12:41:41 -0700 (PDT) Subject: [PATCH] RISC-V: Use the X iterator for eh_set_lr_{si,di} Date: Sat, 6 Aug 2022 12:40:47 -0700 Message-Id: <20220806194046.19446-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Palmer Dabbelt <palmer@rivosinc.com> To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1740442110608276481?= X-GMAIL-MSGID: =?utf-8?q?1740442110608276481?= |
Series |
RISC-V: Use the X iterator for eh_set_lr_{si,di}
|
|
Commit Message
Palmer Dabbelt
Aug. 6, 2022, 7:40 p.m. UTC
These two patterns were independent, but exactly match the semantics of X. Replace them with a single paramaterized pattern. Thanks to Andrew for pointing this one out over IRC. gcc/ChangeLog * config/riscv/riscv.md (eh_set_lr_<mode>): New pattern. (eh_set_lr_si): Remove. (eh_set_lr_di): Likewise. --- No new failures on the Linux multilibs on trunk. --- gcc/config/riscv/riscv.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
Comments
LGTM, thanks! On Sun, Aug 7, 2022 at 3:42 AM Palmer Dabbelt <palmer@rivosinc.com> wrote: > > These two patterns were independent, but exactly match the semantics of > X. Replace them with a single paramaterized pattern. Thanks to Andrew > for pointing this one out over IRC. > > gcc/ChangeLog > > * config/riscv/riscv.md (eh_set_lr_<mode>): New pattern. > (eh_set_lr_si): Remove. > (eh_set_lr_di): Likewise. > --- > No new failures on the Linux multilibs on trunk. > --- > gcc/config/riscv/riscv.md | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md > index 0796f91dd30..11a59f98a9f 100644 > --- a/gcc/config/riscv/riscv.md > +++ b/gcc/config/riscv/riscv.md > @@ -2562,16 +2562,10 @@ > ;; Clobber the return address on the stack. We can't expand this > ;; until we know where it will be put in the stack frame. > > -(define_insn "eh_set_lr_si" > - [(unspec [(match_operand:SI 0 "register_operand" "r")] UNSPEC_EH_RETURN) > - (clobber (match_scratch:SI 1 "=&r"))] > - "! TARGET_64BIT" > - "#") > - > -(define_insn "eh_set_lr_di" > - [(unspec [(match_operand:DI 0 "register_operand" "r")] UNSPEC_EH_RETURN) > - (clobber (match_scratch:DI 1 "=&r"))] > - "TARGET_64BIT" > +(define_insn "eh_set_lr_<mode>" > + [(unspec [(match_operand:X 0 "register_operand" "r")] UNSPEC_EH_RETURN) > + (clobber (match_scratch:X 1 "=&r"))] > + "" > "#") > > (define_split > -- > 2.34.1 >
diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md index 0796f91dd30..11a59f98a9f 100644 --- a/gcc/config/riscv/riscv.md +++ b/gcc/config/riscv/riscv.md @@ -2562,16 +2562,10 @@ ;; Clobber the return address on the stack. We can't expand this ;; until we know where it will be put in the stack frame. -(define_insn "eh_set_lr_si" - [(unspec [(match_operand:SI 0 "register_operand" "r")] UNSPEC_EH_RETURN) - (clobber (match_scratch:SI 1 "=&r"))] - "! TARGET_64BIT" - "#") - -(define_insn "eh_set_lr_di" - [(unspec [(match_operand:DI 0 "register_operand" "r")] UNSPEC_EH_RETURN) - (clobber (match_scratch:DI 1 "=&r"))] - "TARGET_64BIT" +(define_insn "eh_set_lr_<mode>" + [(unspec [(match_operand:X 0 "register_operand" "r")] UNSPEC_EH_RETURN) + (clobber (match_scratch:X 1 "=&r"))] + "" "#") (define_split