xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/builtins-x86.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc typedef float __m128 __attribute__((__vector_size__(16)));
4*0a6a1f1dSLionel Sambuc typedef double __m128d __attribute__((__vector_size__(16)));
5*0a6a1f1dSLionel Sambuc 
test__builtin_ia32_cmpps(__m128 __a,__m128 __b)6*0a6a1f1dSLionel Sambuc __m128 test__builtin_ia32_cmpps(__m128 __a, __m128 __b) {
7*0a6a1f1dSLionel Sambuc   __builtin_ia32_cmpps(__a, __b, 32); // expected-error {{argument should be a value from 0 to 31}}
8*0a6a1f1dSLionel Sambuc }
9*0a6a1f1dSLionel Sambuc 
test__builtin_ia32_cmppd(__m128d __a,__m128d __b)10*0a6a1f1dSLionel Sambuc __m128d test__builtin_ia32_cmppd(__m128d __a, __m128d __b) {
11*0a6a1f1dSLionel Sambuc   __builtin_ia32_cmppd(__a, __b, 32); // expected-error {{argument should be a value from 0 to 31}}
12*0a6a1f1dSLionel Sambuc }
13*0a6a1f1dSLionel Sambuc 
test__builtin_ia32_cmpss(__m128 __a,__m128 __b)14*0a6a1f1dSLionel Sambuc __m128 test__builtin_ia32_cmpss(__m128 __a, __m128 __b) {
15*0a6a1f1dSLionel Sambuc   __builtin_ia32_cmpss(__a, __b, 32); // expected-error {{argument should be a value from 0 to 31}}
16*0a6a1f1dSLionel Sambuc }
17*0a6a1f1dSLionel Sambuc 
test__builtin_ia32_cmpsd(__m128d __a,__m128d __b)18*0a6a1f1dSLionel Sambuc __m128d test__builtin_ia32_cmpsd(__m128d __a, __m128d __b) {
19*0a6a1f1dSLionel Sambuc   __builtin_ia32_cmpsd(__a, __b, 32); // expected-error {{argument should be a value from 0 to 31}}
20*0a6a1f1dSLionel Sambuc }
21