| 1 |
// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown \ |
| 2 |
// RUN: -target-feature +cmpccxadd -fsyntax-only -verify |
| 3 |
|
| 4 |
#include <immintrin.h> |
| 5 |
|
| 6 |
int test_cmpccxadd32(void *__A, int __B, int __C) { |
| 7 |
return _cmpccxadd_epi32(__A, __B, __C, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}} |
| 8 |
} |
| 9 |
|
| 10 |
long long test_cmpccxadd64(void *__A, long long __B, long long __C) { |
| 11 |
return _cmpccxadd_epi64(__A, __B, __C, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}} |
| 12 |
} |
| 13 |
|
| 14 |
long long test_cmpccxadd64_2(int *__A, long long __B, long long __C) { |
| 15 |
return _cmpccxadd_epi64(__A, __B, __C, 3); // expected-error {{incompatible pointer types passing 'int *' to parameter of type 'long long *'}} |
| 16 |
} |