This is the mail archive of the gcc-patches@gcc.gnu.org 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





> > !   reduc_splus_optab = init_optab (UNKNOWN);
> > !   reduc_uplus_optab = init_optab (UNKNOWN);
>
> Refresh my memory as to why the signed and unsigned plus?
>

from http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00692.html:

> > > 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
where I
> > 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[0], v[1]
(?)


dorit

>
>
> r~


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