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: Richard Henderson <rth at redhat dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 5 Jul 2005 09:36:15 -0700
- Subject: Re: [patch] (4.1 stage 2 projects): vectorize reduction, part 3/n
- References: <20050619172501.GA20194@redhat.com> <OFA7F7C79E.BEFDF6B2-ONC2257026.002CCCDD-C2257026.005118FC@il.ibm.com> <20050620181455.GA22847@redhat.com> <firstname.lastname@example.org> <20050627044507.GA27305@redhat.com> <42CA37D4.email@example.com>
On Tue, Jul 05, 2005 at 09:33:40AM +0200, Paolo Bonzini wrote:
> movdqa a, t1
> movdqa t1, t2
> psubusw b, t2 /* t2 = b[n] >= a[n] ? 0 : a[n] - b[n] */
> psubw t1, t2 /* t1 = b[n] >= a[n] ? a[n] : b[n] */
You had to have meant paddw here, which computes max, not min.
And is in fact what I'm using now.
This computes (b[n] >= a[n] ? -a[n] : -b[n]); not exactly what
we were after.