This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] (4.1 stage 2 projects): vectorize reduction, part 3/n

Richard Henderson <> 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.


> 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...)


> r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]