]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/load_ext_gather_offset_restricted_2.c
[AArch64] Add support for the SVE2 ACLE
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / acle / general-c / load_ext_gather_offset_restricted_2.c
1 /* { dg-do compile } */
2 /* { dg-options "-std=c99" } */
3
4 #include <arm_sve.h>
5
6 #pragma GCC target ("arch=armv8.2-a+sve2")
7
8 struct s { int i; };
9
10 void
11 f1 (svbool_t pg, signed char *s8_ptr, short *s16_ptr,
12 svint8_t s8, svint16_t s16,
13 svint32_t s32, svuint32_t u32, svfloat32_t f32,
14 svint64_t s64, svuint64_t u64, svfloat64_t f64, struct s s)
15 {
16 svldnt1sb_gather_offset (pg, s8_ptr, s32); /* { dg-warning {implicit declaration of function 'svldnt1sb_gather_offset'; did you mean 'svldnt1_gather_offset'} } */
17 svldnt1sb_gather_offset_u32 (pg, s8_ptr); /* { dg-error {too few arguments to function 'svldnt1sb_gather_offset_u32'} } */
18 svldnt1sb_gather_offset_u32 (pg, s8_ptr, u32, 0); /* { dg-error {too many arguments to function 'svldnt1sb_gather_offset_u32'} } */
19 svldnt1sb_gather_offset_u32 (pg, s16_ptr, u32); /* { dg-warning {passing argument 2 of 'svldnt1sb_gather_u32offset_u32' from incompatible pointer type} } */
20 svldnt1sb_gather_offset_u32 (pg, s8_ptr, pg); /* { dg-error {passing 'svbool_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
21 svldnt1sb_gather_offset_u32 (pg, s8_ptr, s8); /* { dg-error {passing 'svint8_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
22 svldnt1sb_gather_offset_u32 (pg, s8_ptr, s16); /* { dg-error {passing 'svint16_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
23 svldnt1sb_gather_offset_u32 (pg, s8_ptr, s32); /* { dg-error {'svldnt1sb_gather_offset_u32' does not support sign-extended offsets} } */
24 svldnt1sb_gather_offset_u32 (pg, s8_ptr, u32);
25 svldnt1sb_gather_offset_u32 (pg, s8_ptr, f32); /* { dg-error {passing 'svfloat32_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
26 svldnt1sb_gather_offset_u32 (pg, s8_ptr, s64); /* { dg-error {passing 'svint64_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
27 svldnt1sb_gather_offset_u32 (pg, s8_ptr, u64); /* { dg-error {passing 'svuint64_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
28 svldnt1sb_gather_offset_u32 (pg, s8_ptr, f64); /* { dg-error {passing 'svfloat64_t' to argument 3 of 'svldnt1sb_gather_offset_u32', which expects a vector of 32-bit integers} } */
29
30 svldnt1sb_gather_offset_u32 (pg, 0, u32);
31 svldnt1sb_gather_offset_u32 (pg, s, u32); /* { dg-error {'struct s' to argument 2 of 'svldnt1sb_gather_offset_u32', which expects a vector or pointer base address} } */
32
33 svldnt1sb_gather_offset_u32 (pg, pg, 0); /* { dg-error {passing 'svbool_t' to argument 2 of 'svldnt1sb_gather_offset_u32', which expects 'svuint32_t'} } */
34 svldnt1sb_gather_offset_u32 (pg, s32, 0); /* { dg-error {passing 'svint32_t' to argument 2 of 'svldnt1sb_gather_offset_u32', which expects 'svuint32_t'} } */
35 svldnt1sb_gather_offset_u32 (pg, u32, 0);
36 svldnt1sb_gather_offset_u32 (pg, u64, 0); /* { dg-error {passing 'svuint64_t' to argument 2 of 'svldnt1sb_gather_offset_u32', which expects 'svuint32_t'} } */
37 }