[cfe-dev] some sse2 intrinsics missing

Chris Lattner clattner at apple.com
Mon Jan 14 16:08:19 PST 2013


On Jan 14, 2013, at 1:32 PM, Richard Hadsell <hadsell at blueskystudios.com> wrote:
> It seems that Clang doesn't recognize all of the sse2 intrinsics:
> ./bssSIMD.h:39:9: error: use of undeclared identifier '__builtin_ia32_cmpgtpd'; did you mean '__builtin_ia32_pcmpgtd'?
>         r.v_ = __builtin_ia32_cmpgtpd (x, xmax.v_);
>                ^~~~~~~~~~~~~~~~~~~~~~
> ...
> ./bssSIMD.h:51:9: error: use of undeclared identifier '__builtin_ia32_cmpltpd'; did you mean '__builtin_ia32_pcmpgtd'?
>         r.v_ = __builtin_ia32_cmpltpd (x, xmin.v_);
>                ^~~~~~~~~~~~~~~~~~~~~~
> However, it does not complain about __builtin_ia32_blendvpd, __builtin_ia32_maxpd, or __builtin_ia32_minpd.
> 
> I built Clang 3.3 from the SVN version about a month ago.  I compile with these options:
> -march=core2 -msse2 -m64 -std=c++0x -fPIC -pthread -gcc-toolchain /opt/gcc-4.7.1
> I expected '-march=core2' to be sufficient to enable the sse2 instructions, and then I added '-msse2' just in case that was the problem.  It didn't help.

Hi Richard,

Here is some more information, along with a script to help upgrade your code:
http://clang.llvm.org/compatibility.html#vector_builtins

-Chris




More information about the cfe-dev mailing list