recent troubles with float vectors & bitwise ops

tbp tbptbp@gmail.com
Thu Aug 23 10:22:00 GMT 2007


Ross Ridge wrote:
> If I were tbp, I'd just code all his vector operatations using intrinsics.
> The other responses in this thread have made it clear that GCC's vector
> arithemetic operations are really only designed to be used with the Cell
> Broadband Engine and other Power PC processors.
Thing is my main use for that extension is for a specialization (made on 
a rainy day out of boredom) of a basic something re-used all over in my 
code; the default implementation uses intrinsics.
It turns out, when benchmarked, that i get better code with the 
specialization. So it's more convenient and faster, win/win.

I'm unsure why the code is better in the end, perhaps because the 
may_alias attribute of __m128, perhaps because some builtins which are 
used to implement those intrinsics are mistyped (ie v4si 
__builtin_ia32_cmpltps (v4sf, v4sf))... i don't know, i'd need to try a 
builtin based specialization.

In any case that vector extension is now totally useless on x86 and 
conflicts with the documentation.



More information about the Gcc mailing list