This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][RFC] Do some vectorizer-friendly canonicalization before vectorization
- From: Richard Guenther <rguenther at suse dot de>
- To: Dorit Nuzman <DORIT at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Nov 2006 15:33:37 +0100 (CET)
- Subject: Re: [PATCH][RFC] Do some vectorizer-friendly canonicalization before vectorization
- References: <OF59382EB6.D2BDE4BC-ONC2257233.004DAAAC-C2257233.004E51A3@il.ibm.com>
On Mon, 27 Nov 2006, Dorit Nuzman wrote:
> Richard Guenther <firstname.lastname@example.org> wrote on 27/11/2006 15:24:45:
> > > > I think the cast may be because powf is C99 or the ppc target you are
> > > > testing doesn't have it at all?
> > >
> > > I see the same thing on x86
> > >
> > > > Does it work for you if you enable
> > > > -std=c99?
> > > >
> > >
> > > -std=c99 doesn't make a difference...
> > Hm, ok. I'm going to restrict this to x86_64 then, where I have
> > (no cast) and i686 (no cast as well) at the point i686 backend
> > support for vectorization of sqrt goes in (I'll resubmit it
> > after testing now that the generic support for vectorizing
> > functions is in).
> wonder why I see the cast on my system (i386-redhat-linux).
> Anyhow, I think better to avoid enabling for specific targets, but use
> target keywords instead. It would be good to enable the test for all
> relevant targets (say, vec_float), and have it xfail on those that don't
> support the math builtins yet.
> > Meanwhile the following resolves the pattern issues (leaving the
> > above testcase alone for now).
> > Bootstrapped & tested on x86_64-unknown-linux-gnu.
> > Ok for mainline?
> ok with me (given the followup testcase fix)
> (though I can't approve).
Applied as obvious.
> > 2006-11-27 Richard Guenther <email@example.com>
> > * tree-vectorizer.h (vectorizable_function): Export.
> > * tree-vect-transform.c (vectorizable_function): Likewise.
> > * tree-vect-patterns.c (vect_recog_pow_pattern): Set
> > type_in to scalar type in recognition of squaring.
> > Make sure the target can vectorize sqrt in recognition
> > of sqrt, set type_in to vector type in this case.
> > * gcc.dg/vect/vect-pow-1.c: Rename ...
> > * gcc.dg/vect/fast-math-vect-pow-1.c: ... to this. Use
> > floats instead of doubles, check successful vectorization.