Re: [PATCH] Add support for lzd and popc instructions on sparc.

2011-10-06 Thread David Miller
From: Richard Henderson Date: Thu, 06 Oct 2011 10:47:28 -0700 > You've said that POPC only operates on the full 64-bit register, > but I see no zero-extend of the SImode input? Similarly for > the clzsi patterns. This addresses all of the problems you found, and also exposes the "sub 32" to th

Re: [PATCH] Add support for lzd and popc instructions on sparc.

2011-10-06 Thread David Miller
From: Richard Henderson Date: Thu, 06 Oct 2011 10:47:28 -0700 > You've said that POPC only operates on the full 64-bit register, > but I see no zero-extend of the SImode input? Similarly for > the clzsi patterns. Thanks for catching this. I guess if I emit the zero-extend, the compiler will e

Re: [PATCH] Add support for lzd and popc instructions on sparc.

2011-10-06 Thread Richard Henderson
On 10/05/2011 11:41 PM, David Miller wrote: > +(define_expand "popcount2" > + [(set (match_operand:SIDI 0 "register_operand" "") > +(popcount:SIDI (match_operand:SIDI 1 "register_operand" "")))] > + "TARGET_POPC" > +{ > + if (! TARGET_ARCH64) > +{ > + emit_insn (gen_popcount_v8p