This is the mail archive of the
mailing list for the GCC project.
Re: PPC64 libmvec implementation of sincos
- From: GT <tnggil at protonmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: "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: Mon, 25 Nov 2019 16:53:25 +0000
- Subject: Re: PPC64 libmvec implementation of sincos
- References: <GcaLIHZaxSm2PVhunNuxEwEJB-BC3PeXIBlmYb6eMw54vZQ_KF6uBjlTgWmWtPNIMMeXu7UyYg797u1vV1_GS2Qv3ThxrUeORQD0wcddwwofirstname.lastname@example.org> <email@example.com> <3F536966-92DE-49A3-A432-5646981EE26F@gmail.com>
- Reply-to: GT <tnggil at protonmail dot com>
> > 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.
1. Using flags -fopt-info-all and -fopt-info-internals, the failure to vectorize sincos
is reported as "unsupported data-type: complex double". The default GCC behavior is to
replace sincos calls with calls to __builtin_cexpi.
2. Using flags -fno-builtin-sincos and -fno-builtin-cexpi, the failure to vectorize
sincos is different. In this case, the failure to vectorize is due to "number of iterations
could not be computed". No calls to __builtin_cexpi; sincos calls retained.
1. Should we aim to provide a vectorized version of __builtin_cexpi? If so, it would have
to be a PPC64-only vector __builtin-cexpi, right?
2. Or should we require that vectorized sincos be available only when -fno-builtin-sincos flag
is used in compilation?
I don't think we need to fix both types of vectorization failures in order to obtain sincos