This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PPC64 libmvec implementation of sincos
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: GT <tnggil at protonmail 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: Thu, 5 Dec 2019 10:44:39 +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>
On Wed, Dec 4, 2019 at 9:53 PM GT <tnggil@protonmail.com> wrote:
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, November 27, 2019 3:19 AM, Richard Biener <richard.guenther@gmail.com> wrote:
>
> ...
>
> > > Questions:
> > >
> > > 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
> > > vectorization.
> >
> > I think we should have a vectorized cexpi since that's having a sane
> > ABI. The complex
> > return type of cexpi makes it a little awkward for the vectorizer but
> > handling this should
> > be manageable. It's a bit difficult to expose complex types to the
> > vectorizer since
> > most cases are lowered early.
> >
>
> I'm trying to identify the source code which needs modification but I need help proceeding.
>
> I am comparing two compilations: The first is a simple file with a call to sin in a loop.
> Vectorization succeeds. The second is an almost identical file but with a call to sincos
> in the loop. Vectorization fails.
>
> In gdb, the earliest code location where the two compilations differ is in function
> number_of_iterations_exit_assumptions in file tree-ssa-loop-niter.c. Line
>
> op0 = gimple_cond_lhs (stmt);
>
> returns a tree which when analyzed in function instantiate_scev_r (in file tree-scalar-evolution.c)
> results in the first branch of the switch being taken for sincos. For sin, the 2nd branch of the
> switch is taken.
>
> How can I correlate stmt in the source line above to the relevant line in any dump among those created
> using debugging dump option -fdump-tree-all?
grep ;)
Can you provide a testcase with a simd attribute annotated cexpi that
one can play with?
Richard.
>
> Thanks.
> Bert.