From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42985 invoked by alias); 17 Jan 2020 08:19:46 -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 42974 invoked by uid 89); 17 Jan 2020 08:19:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=H*f:sk:GcaLIHZ, H*f:sk:CCED278, H*f:sk:hd-6QLi, H*f:sk:1bP43sI X-HELO: mail-lf1-f67.google.com Received: from mail-lf1-f67.google.com (HELO mail-lf1-f67.google.com) (209.85.167.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Jan 2020 08:19:35 +0000 Received: by mail-lf1-f67.google.com with SMTP id m30so17635194lfp.8 for ; Fri, 17 Jan 2020 00:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4Vw9gpJWYrYcJG2gcBbM0WIxXGZAbqm/iU4ESrYIo80=; b=SFxvLVvzwgPRb7XITBcjlbnosSajvcrp6RTSJHac+VtkhqczATCat1NYfPaBLGxUlg 0Ptub6vTEFSQOlrK+LhO9rVmA8KngHNjINI1r+P+RyAfshg8BmuYiTvLaIo7yzdcBFiL us67YEOliLtlD7ewsf2ZPz/ALQSCdFCF0glRaIjfMRXcgOMbYSJkuQHiDqoO5ihCuJbf /zOFfc+sw4tsLdlpfJAADpTwyL0Qj6B8BvMAk0LsLsnv+gz/b1z3BZP43qOfxOKYzb7G WHcg2DiW7lJyA0Ix6ixH3/GppV6D99RLpvvaDMGlBSCSQrEAOH2mr7kSRwyK39JdIgSH Qp1w== MIME-Version: 1.0 References: <20191206111540.GC10088@tucnak> <1bP43sIDtgGcokozEcGeINTETW5pPYQ93fU4Eo0b856l8R-Nm6eYIaOTA9T6TRVou2CJTWkya2uRIP4SJHX2vuXhyOaxH-IKMrw8aFht2-Q=@protonmail.com> In-Reply-To: <1bP43sIDtgGcokozEcGeINTETW5pPYQ93fU4Eo0b856l8R-Nm6eYIaOTA9T6TRVou2CJTWkya2uRIP4SJHX2vuXhyOaxH-IKMrw8aFht2-Q=@protonmail.com> From: Richard Biener Date: Fri, 17 Jan 2020 16:37:00 -0000 Message-ID: Subject: Re: PPC64 libmvec implementation of sincos To: GT Cc: Jakub Jelinek , "gcc@gcc.gnu.org" , Szabolcs Nagy , nd , Bill Schmidt Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00337.txt.bz2 On Thu, Jan 16, 2020 at 4:54 PM GT wrote: > > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original = Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > On Wednesday, January 15, 2020 3:20 PM, GT wrote: > > > =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Origina= l Message =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 > > On Thursday, January 9, 2020 8:42 AM, Richard Biener richard.guenther@g= mail.com wrote: > > > > > As for the other question for testing you probably want to provide a > > > OMP simd declaration > > > of a function like > > > _Complex double mycexpi (double); > > > and make a testcase like > > > void foo (_Complex double * __restrict out, double *in) > > > { > > > for (int i =3D 0; i < 1024; ++i) > > > { > > > out[i] =3D mycexpi (in[i]); > > > } > > > } > > > or eventually with two output arrays and explicit __real/__imag > > > processing. The real > > > and main question is how is the OMP SIMD declaration of mycexpi looki= ng like? > > > So I'd completely side-step sincos() and GCCs sincos() -> > > > __builtin_cepxi transform > > > and concentrate on OMP SIMD of a function with the signature we need = to handle. > > > Richard. > > > > I think what is required here is to attach either #pragma omp declare s= imd orattribute ((simd)) > > to the declaration of builtin cexpi. In gcc/builtins.def, some attribut= es are provided during > > creation of cexpi (line 656, call containing BUILT_IN_CEXPI). Attaching= the simd attributes to > > function declarations is how sin, cos, and the other math functions wer= e handled in math-vector.h > > glibc header file. > > You probably intended that we first teach GCC how to vectorize any functi= on which returns a > _Complex double and has a single parameter of type double. When that's do= ne, move on to solving > the specific vectorization of __builtin_cexpi. Right? Yes. Richard. > Bert.