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


On Tue, Jun 21, 2005 at 09:03:48AM +0200, Paolo Bonzini wrote:
> I think min and max should be implemented in term of unsigned saturated 
> subtraction for unsigned values.

Hmm, yes.

uminv8hi:
	movdqa	a, t1
	psubusw	b, t1	/* t1[n] == 0 iff b[n] >= a[n] */
	pxor	t2, t2
	pcmpeqw	t1, t2	/* t2[n] = b[n] < a[n] ? -1 : 0 */
	movdqa	t2, t3
	pand	a, t3
	pandn	b, t2
	por	t3, t2

I suppose that's just about comparable with what we'd need to
do to expand to wider operations.

I'll work on this...


r~


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