[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / aarch64-sve-intrinsics / acle_sve_imm_rotation.cpp
blobf73a73d3ac6561236e1857d485c1695b05db9bf2
1 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify %s
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -fsyntax-only -verify %s
6 #ifdef SVE_OVERLOADED_FORMS
7 // A simple used,unused... macro, long enough to represent any SVE builtin.
8 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
9 #else
10 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
11 #endif
13 #include <arm_sve.h>
15 void test_90_270(svbool_t pg)
17 // expected-error@+1 {{argument should be the value 90 or 270}}
18 SVE_ACLE_FUNC(svcadd,_f16,_x,)(pg, svundef_f16(), svundef_f16(), 0);
19 // expected-error@+1 {{argument should be the value 90 or 270}}
20 SVE_ACLE_FUNC(svcadd,_f16,_z,)(pg, svundef_f16(), svundef_f16(), 180);
21 // expected-error@+1 {{argument should be the value 90 or 270}}
22 SVE_ACLE_FUNC(svcadd,_f16,_m,)(pg, svundef_f16(), svundef_f16(), 0);
23 // expected-error@+1 {{argument should be the value 90 or 270}}
24 SVE_ACLE_FUNC(svcadd,_f32,_x,)(pg, svundef_f32(), svundef_f32(), 180);
25 // expected-error@+1 {{argument should be the value 90 or 270}}
26 SVE_ACLE_FUNC(svcadd,_f32,_z,)(pg, svundef_f32(), svundef_f32(), 0);
27 // expected-error@+1 {{argument should be the value 90 or 270}}
28 SVE_ACLE_FUNC(svcadd,_f32,_m,)(pg, svundef_f32(), svundef_f32(), 180);
29 // expected-error@+1 {{argument should be the value 90 or 270}}
30 SVE_ACLE_FUNC(svcadd,_f64,_x,)(pg, svundef_f64(), svundef_f64(), 0);
31 // expected-error@+1 {{argument should be the value 90 or 270}}
32 SVE_ACLE_FUNC(svcadd,_f64,_z,)(pg, svundef_f64(), svundef_f64(), 180);
33 // expected-error@+1 {{argument should be the value 90 or 270}}
34 SVE_ACLE_FUNC(svcadd,_f64,_m,)(pg, svundef_f64(), svundef_f64(), 0);
37 void test_0_90_180_270(svbool_t pg)
39 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
40 SVE_ACLE_FUNC(svcmla,_f16,_x,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
41 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
42 SVE_ACLE_FUNC(svcmla,_f16,_z,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
43 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
44 SVE_ACLE_FUNC(svcmla,_f16,_m,)(pg, svundef_f16(), svundef_f16(), svundef_f16(), 19);
45 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
46 SVE_ACLE_FUNC(svcmla_lane,_f16,,)(svundef_f16(), svundef_f16(), svundef_f16(), 0, 19);
47 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
48 SVE_ACLE_FUNC(svcmla,_f32,_x,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
49 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
50 SVE_ACLE_FUNC(svcmla,_f32,_z,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
51 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
52 SVE_ACLE_FUNC(svcmla,_f32,_m,)(pg, svundef_f32(), svundef_f32(), svundef_f32(), 19);
53 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
54 SVE_ACLE_FUNC(svcmla_lane,_f32,,)(svundef_f32(), svundef_f32(), svundef_f32(), 0, 19);
55 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
56 SVE_ACLE_FUNC(svcmla,_f64,_x,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);
57 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
58 SVE_ACLE_FUNC(svcmla,_f64,_z,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);
59 // expected-error@+1 {{argument should be the value 0, 90, 180 or 270}}
60 SVE_ACLE_FUNC(svcmla,_f64,_m,)(pg, svundef_f64(), svundef_f64(), svundef_f64(), 19);