> Maxim Kuvyrkov wrote:
>
> You are removing the 2nd alternative that generates "abs" with your patch.  
> While I agree that
> using "csneg" is faster on all implementations, can you say the same for 
> "abs"?  Especially
> given the fact that csneg requires 4 operands instead of abs'es 2?

Yes, given that latencies of scalar SIMD instructions are typically worse than 
integer
latencies. The number of operands is not an issue.

> Wouldn't it be better to have (define_expand "abs<mode>2") that would expand 
> into either
> csneg3<mode> or second alternative of current absdi2?

How would that be possible? You'd have to delay expansion until after register 
allocation,
which loses optimization opportunities. And I still don't see how it would ever 
make sense 
to execute integer operations as scalar SIMD.

Wilco





Reply via email to