[PATCH] Add pixel compare VIS intrinsics.

David Miller davem@davemloft.net
Thu Sep 22 20:36:00 GMT 2011


From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Thu, 22 Sep 2011 19:31:07 +0000 (UTC)

> On Wed, 21 Sep 2011, David Miller wrote:
> 
>> Unfortunately, we can't use these for comparisons on vectors as the
>> compiler wants them.  Instead of producing a vector of comparison
>> results, these instructions produce a small bitmask of those results
>> in a destination integer register.  Therefore we have to provide
>> them using unspecs and builtins.
> 
> Do you have any instructions to convert the bitmask into a vector of 
> results?  (Cf. what I said in 
> <http://gcc.gnu.org/ml/gcc-patches/2010-08/msg01120.html> about vector 
> comparisons on C6X, where there are XPND2 and XPND4 instructions for that 
> conversion, but you'd still like operations written to use abstract 
> comparisons generating code that avoids the expansion instructions if 
> possible.)

Unfortunately, no.

But it's interesting to know that another processor implements vector
comparisons the same way Sparc VIS does.



More information about the Gcc-patches mailing list