From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id DA7BB385702F for ; Mon, 10 Aug 2020 18:07:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DA7BB385702F 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-429-sSs2_zF4PBGMtw6tSahIkA-1; Mon, 10 Aug 2020 14:07:32 -0400 X-MC-Unique: sSs2_zF4PBGMtw6tSahIkA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4126C80183C; Mon, 10 Aug 2020 18:07:31 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-113-174.ams2.redhat.com [10.36.113.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C710219C4F; Mon, 10 Aug 2020 18:07:30 +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 07AI7Rth012788; Mon, 10 Aug 2020 20:07:27 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 07AI7PbP012787; Mon, 10 Aug 2020 20:07:25 +0200 Date: Mon, 10 Aug 2020 20:07:25 +0200 From: Jakub Jelinek To: GT Cc: "gcc-patches@gcc.gnu.org" , "segher@kernel.crashing.org" , "dje.gcc@gmail.com" , "wschmidt@linux.ibm.com" , "tuliom@linux.ibm.com" , Bert Tenjy Subject: Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI. Message-ID: <20200810180725.GA2363@tucnak> Reply-To: Jakub Jelinek References: <1596832552-111518-1-git-send-email-tnggil@protonmail.com> <20200807205905.GD2363@tucnak> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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=-7.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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: Mon, 10 Aug 2020 18:07:38 -0000 On Mon, Aug 10, 2020 at 05:29:49PM +0000, GT wrote: > > For PowerPC, if all you want to support is b which requires VSX, then the > > right thing is for !TREE_PUBLIC functions return 0 if !TARGET_VSX and > > otherwise set vecsize_mangle to 'b' and in the end return 1, for exported > > functions always set it to 'b' (and in the end return 1). > > Then ensure that the 'b' variants of function definitions get target ("vsx") > > attribute added if !TARGET_VSX. > > > > So setting attribute "vsx" for 'b' variants of function definitions is what > should go in function rs6000_simd_clone_usable? No. That function should say if the particular clone ('b' in this case) is usable from some caller, and the answer for your 'b' is TARGET_VSX is required to be non-zero. The adjustment should go into the simd_clone_adjust target hook, see what ix86_simd_clone_adjust does (though, that one has more variants to handle). Jakub