This is the mail archive of the
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: Sun, 19 Jun 2005 23:34:44 +0300
- Subject: Re: [patch] (4.1 stage 2 projects): vectorize reduction, part 3/n
> > ! reduc_splus_optab = init_optab (UNKNOWN);
> > ! reduc_uplus_optab = init_optab (UNKNOWN);
> Refresh my memory as to why the signed and unsigned plus?
> > > You'd only need separate signed/unsigned optabs for saturating
> > > arithmetic. But as described above, I don't think we should bother
> > > with those at all.
> > isn't the "reduce plus hi" using vsum4shs as mentioned above a case
> > need separate signed/unsigned optabs?
> Oh, right. Silly altivec. Ok, separate signed/unsigned optabs it is.
> It would be better to extract the first two elements to begin,
> rather than adding to scalar_initial_def. In the case of 2-wide
> vectors, this results in one addition rather than two.
you mean if scalar_initial_def is zero? cause otherwise we have 3 items to
add (or whatever operation we're doing) - scalar_initial_def, v, v