From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 52FA838708A4 for ; Tue, 23 Jun 2020 16:51:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 52FA838708A4 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-423-hD8oiUj1NIqERPT6RgwYjw-1; Tue, 23 Jun 2020 12:51:14 -0400 X-MC-Unique: hD8oiUj1NIqERPT6RgwYjw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 611D31005512; Tue, 23 Jun 2020 16:51:12 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-94.ams2.redhat.com [10.36.112.94]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE2E15DAA0; Tue, 23 Jun 2020 16:51:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 05NGp8rs001866; Tue, 23 Jun 2020 18:51:08 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 05NGp7TB001865; Tue, 23 Jun 2020 18:51:07 +0200 Date: Tue, 23 Jun 2020 18:51:07 +0200 From: Jakub Jelinek To: Thomas Schwinge Cc: Kwok Cheung Yeung , Tom de Vries , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] nvptx: Add support for subword compare-and-swap Message-ID: <20200623165107.GA8462@tucnak> Reply-To: Jakub Jelinek References: <3cbe58e6-b427-ff0d-b7d1-8723aac82b18@codesourcery.com> <87o8p920lx.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 In-Reply-To: <87o8p920lx.fsf@euler.schwinge.homeip.net> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 23 Jun 2020 16:51:20 -0000 On Tue, Jun 23, 2020 at 06:44:26PM +0200, Thomas Schwinge wrote: > On 2020-06-15T21:28:12+0100, Kwok Cheung Yeung wrote: > > This patch adds support on nvptx for __sync_val_compare_and_swap operations on > > 1- and 2-byte values. > > Is this a thorough review that these are the only functions missing, or > did you just implement what you found missing for some test case you've > been looking into? Other architectures' similar libgcc files seem to be > defining more of such related functions. > It seems a bit unfortunate to have such a thing outlined in a separate > function, given we're talking about performance-critical code here? Even > more so for GCN, where there's no JIT compiler that can inline it later, > as it's the case for nvptx? I think this should really be handled by the backend inline, like many other targets do it when they only support 32-bit+ and not 8/16-bit atomics. See e.g. sparc backend. Jakub