From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87804 invoked by alias); 30 Sep 2019 18:09:52 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 87795 invoked by uid 89); 30 Sep 2019 18:09:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:0728c06, H*i:sk:0728c06 X-HELO: mail-wm1-f44.google.com Received: from mail-wm1-f44.google.com (HELO mail-wm1-f44.google.com) (209.85.128.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Sep 2019 18:09:51 +0000 Received: by mail-wm1-f44.google.com with SMTP id 7so513069wme.1 for ; Mon, 30 Sep 2019 11:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:cc:from:message-id; bh=u8rcOEiUgY8VRE3vFVp22OKVtKWw3zINpjc3scb0KSU=; b=ctirF5IRoBMW1ef1h4jzMVcUSvOissPPAP6Y2Z/ggZPTiAAJJreUQC7eAF1Kkz37JV 9j8il4zktP9bYJx8J6tvcHuEws3HUSKbSA3RsmkiBWNtrDa9EmQZSSoXLiZPX1IQXx77 U0PaiANssZw4NbRpu0Srfzjgevt7FXGp4uzRfl2Tq6yBG6GkXo9n40B7Oc7XaUBb4c/D DYvDL/lGHci81N00v7klO71owU1L07r7pn+xUF3mv9Db5agumcUY/CsQL7zCBc/ncu3d LKFxKLVJJY0TmSXqQhFjBaV7Y1Tdua0E7otjJZOT1W7dvrxD0FKL8HeBZjZLwg7v/tb7 zOKQ== Return-Path: Received: from [192.168.178.32] (x5f7344e9.dyn.telefonica.de. [95.115.68.233]) by smtp.gmail.com with ESMTPSA id e30sm26051309wra.48.2019.09.30.11.09.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Sep 2019 11:09:48 -0700 (PDT) Date: Mon, 30 Sep 2019 18:09:00 -0000 User-Agent: K-9 Mail for Android In-Reply-To: <0728c06a-d506-e8e8-c4a5-9187a7047f5f@arm.com> References: <0728c06a-d506-e8e8-c4a5-9187a7047f5f@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: PPC64 libmvec implementation of sincos To: gcc@gcc.gnu.org,Szabolcs Nagy ,GT ,"gcc@gcc.gnu.org" CC: nd ,Bill Schmidt From: Richard Biener Message-ID: <3F536966-92DE-49A3-A432-5646981EE26F@gmail.com> X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00266.txt.bz2 On September 30, 2019 3:52:52 PM GMT+02:00, Szabolcs Nagy wrote: >On 27/09/2019 20:23, GT wrote: >> I am attempting to create a vector version of sincos for PPC64. >> The relevant discussion thread is on the GLIBC libc-alpha mailing >list. >> Navigate it beginning at >https://sourceware.org/ml/libc-alpha/2019-09/msg00334.html >>=20 >> The intention is to reuse as much as possible from the existing GCC >implementation of other libmvec functions. >> My questions are: Which function(s) in GCC; >>=20 >> 1. Gather scalar function input arguments, from multiple loop >iterations, into a single vector input argument for the vector function >version? >> 2. Distribute scalar function outputs, to appropriate loop iteration >result, from the single vector function output result? >>=20 >> I am referring especially to vectorization of sin and cos. > >i wonder if gcc can auto-vectorize scalar sincos >calls, the vectorizer seems to want the calls to >have no side-effect, but attribute pure or const >is not appropriate for sincos (which has no return >value but takes writable pointer args) We have __builtin_cexpi for that but not sure if any of the mechanisms can = provide a mapping to a vectorized variant.=20 >"#pragma omp simd" on a loop seems to work but i >could not get unannotated sincos loops to vectorize. > >it seems it would be nice if we could add pure/const >somehow (maybe to the simd variant only? afaik openmp >requires no sideeffects for simd variants, but that's >probably only for explicitly marked loops?)