1 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +sse2 -fsyntax-only -verify %s |
2 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -target-feature +sse2 -fsyntax-only -verify %s -x c++ |
3 | |
4 | void f() { |
5 | (void)_mm_getcsr(); // expected-warning{{implicitly declaring library function '_mm_getcsr'}} \ |
6 | // expected-note{{include the header <xmmintrin.h> or explicitly provide a declaration for '_mm_getcsr'}} |
7 | _mm_setcsr(1); // expected-warning{{implicitly declaring library function '_mm_setcsr'}} \ |
8 | // expected-note{{include the header <xmmintrin.h> or explicitly provide a declaration for '_mm_setcsr'}} |
9 | _mm_sfence(); // expected-warning{{implicitly declaring library function '_mm_sfence'}} \ |
10 | // expected-note{{include the header <xmmintrin.h> or explicitly provide a declaration for '_mm_sfence'}} |
11 | |
12 | _mm_clflush((void*)0); // expected-warning{{implicitly declaring library function '_mm_clflush'}} \ |
13 | // expected-note{{include the header <emmintrin.h> or explicitly provide a declaration for '_mm_clflush'}} |
14 | _mm_lfence(); // expected-warning{{implicitly declaring library function '_mm_lfence'}} \ |
15 | // expected-note{{include the header <emmintrin.h> or explicitly provide a declaration for '_mm_lfence'}} |
16 | _mm_mfence(); // expected-warning{{implicitly declaring library function '_mm_mfence'}} \ |
17 | // expected-note{{include the header <emmintrin.h> or explicitly provide a declaration for '_mm_mfence'}} |
18 | _mm_pause(); // expected-warning{{implicitly declaring library function '_mm_pause'}} \ |
19 | // expected-note{{include the header <emmintrin.h> or explicitly provide a declaration for '_mm_pause'}} |
20 | } |
21 | |
22 | unsigned int _mm_getcsr(); |
23 | void _mm_setcsr(unsigned int); |
24 | void _mm_sfence(); |
25 | |
26 | void _mm_clflush(void const *); |
27 | void _mm_lfence(); |
28 | void _mm_mfence(); |
29 | void _mm_pause(); |
30 | |
31 | void g() { |
32 | (void)_mm_getcsr(); |
33 | _mm_setcsr(1); |
34 | _mm_sfence(); |
35 | |
36 | _mm_clflush((void*)0); |
37 | _mm_lfence(); |
38 | _mm_mfence(); |
39 | _mm_pause(); |
40 | } |
41 | |