This is the mail archive of the
mailing list for the GCC project.
Re: enabling SSE for 3-vector inner product
- From: Marc Glisse <marc dot glisse+gcc at normalesup dot org>
- To: Qianqian Fang <fangqq at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org, brian dot budge at gmail dot com
- Date: Fri, 30 Apr 2010 12:31:24 +0200 (CEST)
- Subject: Re: enabling SSE for 3-vector inner product
- References: <4BD9FE06.firstname.lastname@example.org>
- Reply-to: gcc-help at gcc dot gnu dot org
On Thu, 29 Apr 2010, Qianqian Fang wrote:
Here is my SSE3 vec_dot
typedef struct CPU_float4 pvec;
Shouldn't there be some magic here for alignment purposes?
now I am trying to use SSE4.x DPPS, but gcc gave me
error. I don't know if I used it with a wrong format.
Did you try using the intrinsic _mm_dp_ps?
"dpps %%xmm0, %%xmm1, 0xF1 \n\t"
Maybe the order of the arguments is reversed in asm and it likes a $
before a constant (and it prefers fewer parentheses on the next line).
In any case, you shouldn't get a factor 2 compared to the SSE3 version, so
that won't be enough for you.