recent troubles with float vectors & bitwise ops
Tim Prince
tprince@computer.org
Fri Aug 24 13:23:00 GMT 2007
Paolo Bonzini wrote:
>
> 2) selection operations on vectors, kind of (v1 <= v2 ? v3 : v4). These
> can be written for example like this:
>
> cmpleps xmm1, xmm2 ; xmm1 = xmm1 <= xmm2 ? all-ones : 0
> andnps xmm4, xmm1 ; xmm4 = xmm1 <= xmm2 ? 0 : xmm4
> andps xmm1, xmm3 ; xmm1 = xmm1 <= xmm2 ? xmm3 : 0
> orps xmm1, xmm4 ; xmm1 = xmm1 <= xmm2 ? xmm3 : xmm4
SSE4 introduces specific instruction support, with a shorter sequence
for this purpose. It seems to be quite difficult to persuade gcc to use it.
More information about the Gcc
mailing list