This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PPC64 libmvec implementation of sincos
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GT <tnggil at protonmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>, nd <nd at arm dot com>, Bill Schmidt <wschmidt at linux dot ibm dot com>
- Date: Fri, 6 Dec 2019 12:15:40 +0100
- Subject: Re: PPC64 libmvec implementation of sincos
- References: <GcaLIHZaxSm2PVhunNuxEwEJB-BC3PeXIBlmYb6eMw54vZQ_KF6uBjlTgWmWtPNIMMeXu7UyYg797u1vV1_GS2Qv3ThxrUeORQD0wcddwwo=@protonmail.com> <0728c06a-d506-e8e8-c4a5-9187a7047f5f@arm.com> <3F536966-92DE-49A3-A432-5646981EE26F@gmail.com> <H7bxRYXZvjXK7ldtctmFF0Yn_APn9JL2aROfOmb6AcDY7FH-hpD6sOakmUfQL0tWzJyUJYlQSZye9d8EVhhibTexqPkDugYdWuvimHAnEbg=@protonmail.com> <CAFiYyc2ZRe-mR_9nYh8vc5i087mzetbZ1aUjZUY7M-H657hjGA@mail.gmail.com> <JvY5F5_4p--Fe-1i2REKyVzeb3ullNSJAxBxyiOfT9lxi7r7ho7fgNf4CNQOiBgrmQP5eHUFiHUjRiZScuMRh-myO4lb_EcXkh81WxJwgdk=@protonmail.com> <CAFiYyc0Fgf+MxZT=aCeAdHthyS3dAze=NNTJ7y+=FvS0RgoyDQ@mail.gmail.com> <JJk2TKaV0tVHVY2AyyGtw7X5lNw90vm80Fhu9YcgQh5QOWlrcyL8bzgSYETL8G9stKmaOX5lYmSAaX6hs9xLnI8iuCTRD0xio9vVxhtApYs=@protonmail.com> <CAFiYyc3FO6jgarVbNn4=kckgw7UYHUaHYxiCv4ZJTMRPuy1dMw@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 06, 2019 at 11:48:03AM +0100, Richard Biener wrote:
> So I used
>
> void sincos(double x, double *sin, double *cos);
> _Complex double __attribute__((__simd__("notinbranch")))
> __builtin_cexpi (double);
While Intel-ABI-Vector-Function-2015-v0.9.8.pdf talks about complex numbers,
the reason we punt:
unsupported return type ‘complex double’ for simd
etc. is that we really don't support VECTOR_TYPE with COMPLEX_TYPE element
type, I guess the vectorizer doesn't do anything with that either unless
some earlier optimization was able to scalarize the complex halves.
In theory we could represent the vector counterparts of complex types
as just vectors of double width with element type of COMPLEX_TYPE element
type, have a look at what exactly ICC does to find out if the vector
ordering is real0 complex0 real1 complex1 ... or
real0 real1 real2 ... complex0 complex1 complex2 ...
and tweak everything that needs to cope.
Jakub