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
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.
r~