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
On Oct 9, 2009, at 4:26 PM, David Greene wrote:> 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.As far as I can tell, GCC 4.x no longer predeclares __builtin_ia32_movddup. g++ gives a clearer error, but in C the function is implicitly declared as a returning int (because of the call), and so you get the type mismatch again. At least, that's my guess (I'm not familiar with GCC internals). Daveed
On Oct 9, 2009, at 1:26 PMPDT, David Greene wrote:> 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);I don't see __builtin_ia32_movddup defined anywhere in the llvm-gcc sources. That's probably it.> 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 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Friday 09 October 2009 15:47, Dale Johannesen wrote:> On Oct 9, 2009, at 1:26 PMPDT, David Greene wrote: > > 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); > > I don't see __builtin_ia32_movddup defined anywhere in the llvm-gcc > sources. That's probably it.Not llvm-gcc. GNU gcc. It's documented here: http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/X86-Built_002din-Functions.html#X86-Built_002din-Functions -Dave
Maybe Matching Threads
- [LLVMdev] Help with gcc SSE intrinsics
- [LLVMdev] Help with gcc SSE intrinsics
- Help: How to define vector element type bool (v8i1) in C builtin function
- [LLVMdev] New LLVM C front-end: "clang"
- Subject: How to define vector element type bool in builtin function