[cfe-dev] some sse2 intrinsics missing

Stephen Canon scanon at apple.com
Mon Jan 14 13:44:19 PST 2013


(To be more clear: don't use builtins for SSE/AVX, they are both non-portable and fragile; include <immintrin.h> and use the intrinsics.)

On Jan 14, 2013, at 4:37 PM, Stephen Canon <scanon at apple.com> wrote:

> This is a builtin, not an intrinsic.  The intrinsic is _mm_cmpgt_pd.
> 
> - Steve
> 
> On Jan 14, 2013, at 4: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.
>> 
>> -- 
>> Dick Hadsell			203-992-6320  Fax: 203-992-6001
>> Reply-to:			hadsell at blueskystudios.com
>> Blue Sky Studios                http://www.blueskystudios.com
>> 1 American Lane, Greenwich, CT 06831-2560
>> Follow Blue Sky Studios on Facebook and Twitter
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130114/f01c0c37/attachment.html>


More information about the cfe-dev mailing list