This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] (4.1 stage 2 projects): vectorize reduction, part 3/n
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Jun 2005 17:46:27 +0300
- Subject: Re: [patch] (4.1 stage 2 projects): vectorize reduction, part 3/n
- Reply-to:
- Sensitivity:
Richard Henderson <rth@redhat.com> wrote on 20/06/2005 01:20:26:
> On Sun, Jun 19, 2005 at 11:34:44PM +0300, Dorit Naishlos wrote:
> > you mean if scalar_initial_def is zero?
>
> Yes.
>
> I suppose it probably isn't a big deal, since we're already under
> -ffast-math, and the 0.0 should get folded away, but we might as
> well spend a couple lines of code and get it right to begin.
>
ok
> I suppose another option here is to defer the decision on which
> method to use until rtl expansion. That is, always produce
> REDUC_PLUS_EXPR during vectorization and add code in optabs to
> choose the correct expansion. There we'd be perfectly placed to
> notice if the vector shift pattern did a FAIL and then fall back
> to the element-by-element operation.
>
true, that's an option too. Not sure to what extent we can benefit from any
tree-optimizations if we do it in the vectorizer. Maybe we'll check in the
current version, and later port the code to expand if we want? (don't have
time to try this right now...)
thanks,
dorit
>
>
> r~