From patchwork Tue Jul 4 01:07:58 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: 115531 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp892816vqx; Mon, 3 Jul 2023 18:08:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdgvY/eVWXMrf6a5Tgc5/7HVEi5HXtASAN+UfZbgTTD17FecpD0wXyMVdYpSOGeS5L12gD X-Received: by 2002:a05:6402:1859:b0:51a:5d43:ab8b with SMTP id v25-20020a056402185900b0051a5d43ab8bmr9140739edy.33.1688432923536; Mon, 03 Jul 2023 18:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688432923; cv=none; d=google.com; s=arc-20160816; b=ZW4nMDpW2oN+6hpcSwVkj+kcOiVVIxLHP7GRKcF8Un59o/3UbTtM1npEtiBvSN0rIh sXtWHavRe2XFZn7xc0Uc6osrhftRoRu0Yu5waK2X4Thw0Us0UDIa1PWYUX9KetnThPhC HGQk+kq3LC6W+FoslEcJbSZqdeiBVYxOdtI78wJr18bvHM36Hllp7X1ZmXqtbNakNtyJ ZOb4EEGeitFM1mt68MJIrknrpAnzxmLyb1sbz3hTVr6GDaxsi88D/6pn/ebtmjPzXrmT 3ZnaGZs4IMF8OgZH0DOP9WNkFe0vdZ7CIZGWVoi5BZwobzWIft+/OrBkX+DIsMZCp34t neow== 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=5k26n2TO0ux9B/t4RVwMF8Fu3kUjNqFmg6eWMSSYb80=; fh=gk9A5O7Gbglvz1MjrRQ4hZ2i3c68kYkpOZJg1emXh+g=; b=G9ZJ8vyo9Zi+Wal/n2xwCYz3X0itvBlQF1L5I2MMJ7aoRUI3J8tXmmo8hRTdD52SgK qrnCgbUCGgOBy+bXcJsP4or12lhoW26RuLtj1S0CMg+tTQHlg+wrODMk2ERyr1YZxweO MadHYq1qFGxy7cl7UoKQ0cv38K18s/1WxJA9U0ZDiC+87qSjdBeJ1P2NOTLvhj2Vb2A8 S28OYCLoQhiPrpjQDmddfs+S7XMP3LH5DuK9aoz1zojWoOlQAf+enQ2kIwBo/fimBgst 6C+95yId7QVtiFF5I9KCCm+A1/QR2HvRIAxk0ryiojmawEkXDY2ZIID+eRKRGYKqzrYy Y7kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=RsTiOsyW; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w26-20020aa7da5a000000b0051e0e87e913si2159263eds.63.2023.07.03.18.08.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 18:08:43 -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=pass header.i=@gcc.gnu.org header.s=default header.b=RsTiOsyW; 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"; 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 38F8F385770F for ; Tue, 4 Jul 2023 01:08:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38F8F385770F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688432922; bh=5k26n2TO0ux9B/t4RVwMF8Fu3kUjNqFmg6eWMSSYb80=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=RsTiOsyWw7QwXOHVrYeJ7hwBwENaE51ILYpmmnmNa6Lyl8W2PB1j3U41YMnJ7t0T/ lMB65Kpj8c4IkBWNKjMmHOcUEoDkjPKwfObBwbwwm+YlECQ46ZW3to7/RtX7mND4yJ iLNSShC8uzPeY7QF3IreMCne4Wl3XXr6GD3IpKN4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id B34533858D35 for ; Tue, 4 Jul 2023 01:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B34533858D35 To: Subject: [committed] CRIS: Replace unspec CRIS_UNSPEC_SWAP_BITS with rtx bitreverse MIME-Version: 1.0 Message-ID: <20230704010758.8E35120418@pchp3.se.axis.com> Date: Tue, 4 Jul 2023 03:07:58 +0200 X-Spam-Status: No, score=-11.3 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?1770450240895857858?= X-GMAIL-MSGID: =?utf-8?q?1770450240895857858?= This is just expected to be a change in representation. No code is expected to change; no new tests are added. * config/cris/cris.md (CRIS_UNSPEC_SWAP_BITS): Remove. ("cris_swap_bits", "ctzsi2"): Use bitreverse instead. --- gcc/config/cris/cris.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 7504b63dabf3..deb2f0c6b7c7 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -50,9 +50,6 @@ (define_c_enum "" [ ;; Stack frame deallocation barrier. CRIS_UNSPEC_FRAME_DEALLOC - - ;; Swap all 32 bits of the operand; 31 <=> 0, 30 <=> 1... - CRIS_UNSPEC_SWAP_BITS ]) ;; Register numbers. @@ -2177,8 +2174,7 @@ (define_insn "bswapsi2" (define_insn "cris_swap_bits" [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "register_operand" "0")] - CRIS_UNSPEC_SWAP_BITS)) + (bitreverse:SI (match_operand:SI 1 "register_operand" "0"))) (clobber (reg:CC CRIS_CC0_REGNUM))] "TARGET_HAS_SWAP" "swapwbr %0" @@ -2193,8 +2189,7 @@ (define_expand "ctzsi2" (match_operand:SI 1 "register_operand")) (clobber (reg:CC CRIS_CC0_REGNUM))]) (parallel - [(set (match_dup 2) - (unspec:SI [(match_dup 2)] CRIS_UNSPEC_SWAP_BITS)) + [(set (match_dup 2) (bitreverse:SI (match_dup 2))) (clobber (reg:CC CRIS_CC0_REGNUM))]) (parallel [(set (match_operand:SI 0 "register_operand")