[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / aarch64-neon-range-checks.c
blob3f01752a33e16f689e072edd2eed1c7a78550bb9
1 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -target-feature +sha3 -target-feature +sm4 -verify %s
3 // REQUIRES: aarch64-registered-target || arm-registered-target
5 #include <arm_neon.h>
7 void test_range_check_vsm3tt1a(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
8 vsm3tt1aq_u32(a, b, c, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
9 vsm3tt1aq_u32(a, b, c, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
10 vsm3tt1aq_u32(a, b, c, 3);
11 vsm3tt1aq_u32(a, b, c, 0);
14 void test_range_check_vsm3tt1b(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
15 vsm3tt1bq_u32(a, b, c, 4);// expected-error {{argument value 4 is outside the valid range [0, 3]}}
16 vsm3tt1bq_u32(a, b, c, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
17 vsm3tt1bq_u32(a, b, c, 3);
18 vsm3tt1bq_u32(a, b, c, 0);
21 void test_range_check_vsm3tt2a(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
22 vsm3tt2aq_u32(a, b, c, 4);// expected-error {{argument value 4 is outside the valid range [0, 3]}}
23 vsm3tt2aq_u32(a, b, c, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
24 vsm3tt2aq_u32(a, b, c, 3);
25 vsm3tt2aq_u32(a, b, c, 0);
28 void test_range_check_vsm3tt2b(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
29 vsm3tt2bq_u32(a, b, c, 4);// expected-error {{argument value 4 is outside the valid range [0, 3]}}
30 vsm3tt2bq_u32(a, b, c, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
31 vsm3tt2bq_u32(a, b, c, 3);
32 vsm3tt2bq_u32(a, b, c, 0);
35 void test_range_check_xar(uint64x2_t a, uint64x2_t b) {
36 vxarq_u64(a, b, -1); // expected-error {{argument value -1 is outside the valid range [0, 63]}}
37 vxarq_u64(a, b, 64); // expected-error {{argument value 64 is outside the valid range [0, 63]}}
38 vxarq_u64(a, b, 0);
39 vxarq_u64(a, b, 63);