This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: recent troubles with float vectors & bitwise ops
- From: rridge at csclub dot uwaterloo dot ca (Ross Ridge)
- To: gcc at gcc dot gnu dot org
- Date: Wed, 22 Aug 2007 20:23:36 -0400 (EDT)
- Subject: Re: recent troubles with float vectors & bitwise ops
Ross Ridge writes:
>tbp is correct. Using casts gets you the integer bitwise instrucitons,
>not the single-precision bitwise instructions that are more optimal for
>flipping bits in single-precision vectors. If you want GCC to generate
>better code using single-precision bitwise instructions you're now forced
>to use the intrinsics.
GCC makes the problem is even worse if only SSE and not SSE 2 instructions
are enabled. Since the integer bitwise instructions are only available
with SSE 2, using casts instead of intrinsics causes GCC to expand the
operation into a long series of instructions.
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.
Ross Ridge