[cfe-commits] r116162 - in /cfe/trunk: lib/CodeGen/CGBuiltin.cpp test/CodeGen/builtins-x86.c

Chris Lattner clattner at apple.com
Sat Oct 9 22:12:08 PDT 2010


On Oct 9, 2010, at 9:58 PM, Argyrios Kyrtzidis wrote:

>>> Why can't they use the right intrinsic from xmmintrin.h?  We prefer not to implement builtins like this, people are supposed to use the official documented interfaces in the *mmintrin.h files.
>> 
>> Oh... unless this is an MMX builtin.  In which case we *do* want to support it, but we *have* to map it onto an LLVM IR intrinsic.
> 
> They are using _mm_cvtsi64_si32 from mmintrin.h, here it is for reference:
> 
> static __inline__ int __attribute__((__always_inline__, __nodebug__))
> _mm_cvtsi64_si32(__m64 __m)
> {
>    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
> }
> 
> The IR emitted for it is the same as llvm-gcc, if it needs mapping onto an LLVM IR intrinsic feel free to make the necessary changes or let me know what they should be.

Ok, cool.  Bill, can you look into hooking up the intrinsic?

-Chris



More information about the cfe-commits mailing list