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