[LLVMdev] Help with gcc SSE intrinsics

David Greene
Fri, 09 Oct 2009 20:26:52 -0000

Ok, I've been looking at this for hours and can't figure it out.  I know
I'm
missing something obvious.

I've been spending the past few days beefing up the vector support in the C
Backend.  This should help us debug vector code that's miscompiled.  But
gcc doesn't like this fragment:

  ((double *)(&llvm_cbe_r1147))[0u] =
(((llvm_cbe_r1146__BITCAST_TEMPORARY.Int64 = 4ull,
llvm_cbe_r1146__BITCAST_TEMPORARY .Double)));
  llvm_cbe_r1148 = __builtin_ia32_movddup(llvm_cbe_r1147);

prog.linked.c:10393: error: incompatible types when assigning to type
'double
__vector__'
 from type 'int'

  double  __attribute__((vector_size(16 ))) llvm_cbe_r1147;
  double  __attribute__((vector_size(16 ))) llvm_cbe_r1148;

Any ideas what gcc is complaining about?  I'm running gcc with -msse3.

                            -Dave