]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/ternary_long_lane_1.c
[AArch64] Add support for the SVE2 ACLE
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / acle / general-c / ternary_long_lane_1.c
1 /* { dg-do compile } */
2
3 #include <arm_sve.h>
4
5 #pragma GCC target ("arch=armv8.2-a+sve2")
6
7 void
8 f1 (svbool_t pg, svint8_t s8, svuint8_t u8, svint16_t s16, svuint16_t u16,
9 svint32_t s32, svuint32_t u32, svint64_t s64, svuint64_t u64,
10 svfloat16_t f16, svfloat32_t f32, svfloat64_t f64, int i)
11 {
12 svmlalb_lane (u64, u32, u32); /* { dg-error {too few arguments to function 'svmlalb_lane'} } */
13 svmlalb_lane (u64, u32, u32, 0, 0); /* { dg-error {too many arguments to function 'svmlalb_lane'} } */
14 svmlalb_lane (0, u16, u16, 0); /* { dg-error {passing 'int' to argument 1 of 'svmlalb_lane', which expects an SVE vector type} } */
15 svmlalb_lane (pg, u16, u16, 0); /* { dg-error {'svmlalb_lane' has no form that takes 'svbool_t' arguments} } */
16 svmlalb_lane (u8, u8, u8, 0); /* { dg-error {'svmlalb_lane' has no form that takes 'svuint8_t' arguments} } */
17 svmlalb_lane (u16, u8, u8, 0); /* { dg-error {'svmlalb_lane' has no form that takes 'svuint16_t' arguments} } */
18 svmlalb_lane (f16, u16, u16, 0); /* { dg-error {'svmlalb_lane' has no form that takes 'svfloat16_t' arguments} } */
19 svmlalb_lane (f32, f16, f16, 0);
20 svmlalb_lane (u32, u16, u16, 0);
21 svmlalb_lane (u32, 0, u16, 0); /* { dg-error {passing 'int' to argument 2 of 'svmlalb_lane', which expects an SVE vector type} } */
22 svmlalb_lane (u32, s16, u16, 0); /* { dg-error {arguments 1 and 2 of 'svmlalb_lane' must have the same signedness, but the values passed here have type 'svuint32_t' and 'svint16_t' respectively} } */
23 svmlalb_lane (u32, u16, 0, 0); /* { dg-error {passing 'int' to argument 3 of 'svmlalb_lane', which expects an SVE vector type} } */
24 svmlalb_lane (u32, u16, s16, 0); /* { dg-error {arguments 1 and 3 of 'svmlalb_lane' must have the same signedness, but the values passed here have type 'svuint32_t' and 'svint16_t' respectively} } */
25 svmlalb_lane (u32, u32, u32, 0); /* { dg-error {passing 'svuint32_t' instead of the expected 'svuint16_t' to argument 2 of 'svmlalb_lane', after passing 'svuint32_t' to argument 1} } */
26 svmlalb_lane (u32, u8, u16, 0); /* { dg-error {passing 'svuint8_t' instead of the expected 'svuint16_t' to argument 2 of 'svmlalb_lane', after passing 'svuint32_t' to argument 1} } */
27 svmlalb_lane (u32, u16, u8, 0); /* { dg-error {passing 'svuint8_t' instead of the expected 'svuint16_t' to argument 3 of 'svmlalb_lane', after passing 'svuint32_t' to argument 1} } */
28 svmlalb_lane (u64, u32, u32, s32); /* { dg-error {argument 4 of 'svmlalb_lane' must be an integer constant expression} } */
29 svmlalb_lane (u64, u32, u32, i); /* { dg-error {argument 4 of 'svmlalb_lane' must be an integer constant expression} } */
30
31 svmlalb_lane (s32, s16, s16, 0);
32 svmlalb_lane (s32, s16, s16, 7);
33 svmlalb_lane (s32, s16, s16, 8); /* { dg-error {passing 8 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 7\]} } */
34 svmlalb_lane (s32, s16, s16, -1); /* { dg-error {passing -1 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 7\]} } */
35
36 svmlalb_lane (u32, u16, u16, 0);
37 svmlalb_lane (u32, u16, u16, 7);
38 svmlalb_lane (u32, u16, u16, 8); /* { dg-error {passing 8 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 7\]} } */
39 svmlalb_lane (u32, u16, u16, -1); /* { dg-error {passing -1 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 7\]} } */
40
41 svmlalb_lane (s64, s32, s32, 0);
42 svmlalb_lane (s64, s32, s32, 3);
43 svmlalb_lane (s64, s32, s32, 4); /* { dg-error {passing 4 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 3\]} } */
44 svmlalb_lane (s64, s32, s32, -1); /* { dg-error {passing -1 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 3\]} } */
45
46 svmlalb_lane (u64, u32, u32, 0);
47 svmlalb_lane (u64, u32, u32, 3);
48 svmlalb_lane (u64, u32, u32, 4); /* { dg-error {passing 4 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 3\]} } */
49 svmlalb_lane (u64, u32, u32, -1); /* { dg-error {passing -1 to argument 4 of 'svmlalb_lane', which expects a value in the range \[0, 3\]} } */
50 }