gcc 4.2.1 xmmintrin.h vs clang's xxmintrin.h


I am compiling a program which uses '__builtin_ia32_cmpgtps' and
'__builtin_ia32_cmpeqps'. I find that they are SSE extensions.
Now the header file for OpenBSD's gcc 4.2.1 /usr/include/xmmintrin.h
has a mention of those two instructions. But the header file for clang
/usr/local/lib/clang/2.9/include/xmmintrin.h doesn't have any mention
of this? Compiling C++ programs is picking up clang's header vs gcc

looking at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080929/007949.html,
it used to be present in clang, now where is it disappeared to?


Hi Amit,

I think the information you are looking for is here:


The upshot is that the GCC builtins are not provided, and users should use the portable high-level operations that lower to the appropriate operations for the given compiler.

Hi Ted,

Thanks, that helped a lot! Now checking if that compiles with system gcc


Assuming you're using the script there, if it doesn't please file a bugzilla and cc me :slight_smile:



What do you think I did? :slight_smile: The script works smoothly with system
gcc, no complaints. I like the way you guys are shaking things up in
compiler land.

Thanks a bunch!

:slight_smile: Thanks for the feedback!