Message ID | 00a701d99995$0c8d3d60$25a7b820$@nextmovesoftware.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp539871vqr; Wed, 7 Jun 2023 16:09:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ayPDY78AaMoHbCD2uEOHF9/So9twFBa6AZV+RFTSINfWt2eYlItJDOGP1I959E+9RTtlH X-Received: by 2002:a17:907:e8a:b0:974:1d8b:ca5f with SMTP id ho10-20020a1709070e8a00b009741d8bca5fmr7572978ejc.9.1686179380470; Wed, 07 Jun 2023 16:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686179380; cv=none; d=google.com; s=arc-20160816; b=d3jx7CtnhZXqafoYtdLiWIdodYaJ0aLFDw61bm6r1/5ELkTsLNvgSuxFP7kTLopUtE LEg422KPegO9liKLG+LcCWorubTG6NTuZbVJ3AU5nz2EHm4QF3DLiJRYlvbnnHfRJ9Yk wi1arcyf3t35lZbYfXIogSvXJRTQEP/iYY6RLIQDKBTJ5E6wXctQJOGU1mfnxfIU25bA ELFtCHRnjRdlHJ6dbh1Ts2fUZiuXkN83jDcPIOw40NeOIbtYMi+pAmW9ugkVNHlAi6D+ idNKuV1k/F0UbvNVS0sJA03B6dy5PoTsQKhx4oKxdNuLro3oLszTFvd/lYsFgyacJfiQ fmbg== 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:content-language:thread-index :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=yLB5ZNbYnDBDvLxhBSjIffUahA8mN+1eF4nzWqZIMU4=; b=dxxf410QMkM5GUZtoI5ubYbDvfGyTFsc6AVkkst5xmFwRa+GSNXOlKx8zLA2HMFq/g UFdbsr2CxS73z64cgKXBxSzNp2PI4Z+Xdfv2g9owKlpYKJR/GC4ald58IhnnFk5wqvMw F698IGCZqTR3mBGRjDAYGrMRwd7MqHrxAssd8O8JLIsQz0zVse1b1P10k2sPDSnQPg4W jFpJOTBP4kQ00artzt64YlRylf5IHP8lFRO0eT3ojog3K/X2JsbvYFUM8zZEPYopY/KS Y3GevWvVFUr8kbjqjZj+nYDNeLKPHtaCl7sAJ1RhSuQuOcWzeLErwssUsackPpERBI/B j1ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=kthBoHzh; 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 u19-20020a170906951300b00969f8ab1d5csi8035762ejx.187.2023.06.07.16.09.40 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 16:09:40 -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=@nextmovesoftware.com header.s=default header.b=kthBoHzh; 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 330E53857734 for <ouuuleilei@gmail.com>; Wed, 7 Jun 2023 23:09:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 8C5F73858C54 for <gcc-patches@gcc.gnu.org>; Wed, 7 Jun 2023 23:09:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8C5F73858C54 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yLB5ZNbYnDBDvLxhBSjIffUahA8mN+1eF4nzWqZIMU4=; b=kthBoHzh4056yIRneYYH1+nmCS AgfRUEfFCObfEt4MJOOJbiqFkU6c3nIXSHhn0Ns6JQioVX1yoeJmihcsHV9E84Ihpk4LLqDpEZiQn 659HDNgJWAzCrFt5FX+L+QpHMSQc5lYPytu8nfin6zaJi11C8Nf3JLVQKJUgJV3EehadYFcBbzUV1 HaAkiJtpNmmcghnBozz4Xwn9Q5r79zxsm2XJZcqmfq9rUyzfhwfnpuFUue3mt0vC2Q2KIS6iuj3Fc hDaIZ8T42JIrO3YSG2YzbnNo0wVex10XvJRHc6KTqCp+kUEHD3/x6CkdfK/BOAKEAqwvHHO/365QE /aA2x2vQ==; Received: from host86-169-41-81.range86-169.btcentralplus.com ([86.169.41.81]:54633 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <roger@nextmovesoftware.com>) id 1q72Gz-0008Q0-3B for gcc-patches@gcc.gnu.org; Wed, 07 Jun 2023 19:09:02 -0400 From: "Roger Sayle" <roger@nextmovesoftware.com> To: <gcc-patches@gcc.gnu.org> Subject: [nvptx PATCH] Update nvptx's bitrev<mode>2 pattern to use BITREVERSE rtx. Date: Thu, 8 Jun 2023 00:09:00 +0100 Message-ID: <00a701d99995$0c8d3d60$25a7b820$@nextmovesoftware.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00A8_01D9999D.6E51A560" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdmZlNQUmWirwVNZTs+LLvaDINXhew== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, 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?1768087230252958308?= X-GMAIL-MSGID: =?utf-8?q?1768087230252958308?= |
Series |
[nvptx] Update nvptx's bitrev<mode>2 pattern to use BITREVERSE rtx.
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Roger Sayle
June 7, 2023, 11:09 p.m. UTC
This minor tweak to the nvptx backend switches the representation of of the brev instruction from an UNSPEC to instead use the new BITREVERSE rtx. This allows various RTL optimizations including evaluation (constant folding) of integer constant arguments at compile-time. This patch has been tested on nvptx-none with make and make -k check with no new failures. Ok for mainline? 2023-06-07 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog * config/nvptx/nvptx.md (UNSPEC_BITREV): Delete. (bitrev<mode>2): Represent using bitreverse. Thanks in advance, Roger --
Comments
Hi! On 2023-06-08T00:09:00+0100, "Roger Sayle" <roger@nextmovesoftware.com> wrote: > This minor tweak to the nvptx backend switches the representation of > of the brev instruction from an UNSPEC to instead use the new BITREVERSE > rtx. ACK. > This allows various RTL optimizations including evaluation (constant > folding) of integer constant arguments at compile-time. ..., which we're then observing via commit 61c45c055a5ccfc59463c21ab057dece822d973c "nvptx: Extend 'brev' test cases" that I just pushed; <https://inbox.sourceware.org/87a5rfum3v.fsf@euler.schwinge.homeip.net> "nvptx: Extend 'brev' test cases". > This patch has been tested on nvptx-none with make and make -k check > with no new failures. Ok for mainline? I've thus updated the test cases for these changes here, and pushed to master branch commit 75c20a99b3a242121eef8a532f5224c00c471b56 "Update nvptx's bitrev<mode>2 pattern to use BITREVERSE rtx.", see attached. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
diff --git a/gcc/config/nvptx/nvptx.md b/gcc/config/nvptx/nvptx.md index 1bb9304..7a7c994 100644 --- a/gcc/config/nvptx/nvptx.md +++ b/gcc/config/nvptx/nvptx.md @@ -34,8 +34,6 @@ UNSPEC_FPINT_CEIL UNSPEC_FPINT_NEARBYINT - UNSPEC_BITREV - UNSPEC_ALLOCA UNSPEC_SET_SOFTSTACK @@ -636,8 +634,7 @@ (define_insn "bitrev<mode>2" [(set (match_operand:SDIM 0 "nvptx_register_operand" "=R") - (unspec:SDIM [(match_operand:SDIM 1 "nvptx_register_operand" "R")] - UNSPEC_BITREV))] + (bitreverse:SDIM (match_operand:SDIM 1 "nvptx_register_operand" "R")))] "" "%.\\tbrev.b%T0\\t%0, %1;")