On 10/05/2011 11:41 PM, David Miller wrote:
> +(define_expand "popcount<mode>2"
> +  [(set (match_operand:SIDI 0 "register_operand" "")
> +        (popcount:SIDI (match_operand:SIDI 1 "register_operand" "")))]
> +  "TARGET_POPC"
> +{
> +  if (! TARGET_ARCH64)
> +    {
> +      emit_insn (gen_popcount<mode>_v8plus (operands[0], operands[1]));
> +      DONE;
> +    }
> +})
> +
> +(define_insn "*popcount<mode>_sp64"
> +  [(set (match_operand:SIDI 0 "register_operand" "=r")
> +        (popcount:SIDI (match_operand:SIDI 1 "register_operand" "r")))]
> +  "TARGET_POPC && TARGET_ARCH64"
> +  "popc\t%1, %0")

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.

If it weren't for the v8plus ugliness, it would be sufficient to
only expose the DImode patterns, and let optabs.c do the work to
extend from SImode...


r~

Reply via email to