xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/x86-builtin-palignr.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -ffreestanding -fsyntax-only -target-feature +ssse3 -target-feature +mmx -verify -triple x86_64-pc-linux-gnu %s
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -ffreestanding -fsyntax-only -target-feature +ssse3 -target-feature +mmx -verify -triple i686-apple-darwin10 %s
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc #include <tmmintrin.h>
5*f4a2713aSLionel Sambuc 
test1(__m64 a,__m64 b,int c)6*f4a2713aSLionel Sambuc __m64 test1(__m64 a, __m64 b, int c) {
7*f4a2713aSLionel Sambuc    // FIXME: The "incompatible result type" error is due to pr10112 and should
8*f4a2713aSLionel Sambuc    // be removed when that is fixed.
9*f4a2713aSLionel Sambuc    return _mm_alignr_pi8(a, b, c); // expected-error {{argument to '__builtin_ia32_palignr' must be a constant integer}} expected-error {{incompatible result type}}
10*f4a2713aSLionel Sambuc }
11*f4a2713aSLionel Sambuc 
test2(int N)12*f4a2713aSLionel Sambuc int test2(int N) {
13*f4a2713aSLionel Sambuc  __m128i white2;
14*f4a2713aSLionel Sambuc  white2 = __builtin_ia32_pslldqi128(white2, N); // expected-error {{argument to '__builtin_ia32_pslldqi128' must be a constant integer}}
15*f4a2713aSLionel Sambuc  return 0;
16*f4a2713aSLionel Sambuc }
17*f4a2713aSLionel Sambuc 
18