Handle unsigned constants for module I/O.
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / strided_load_7.c
blob3a363677525b8e95bc0c61f487ac7ec1b51c4547
1 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
2 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
4 #include <stdint.h>
6 #define TEST_LOOP(DATA_TYPE, NAME, SCALE) \
7 void __attribute__ ((noinline, noclone)) \
8 f_##DATA_TYPE##_##NAME (DATA_TYPE *restrict dest, \
9 DATA_TYPE *restrict src) \
10 { \
11 for (long i = 0; i < 1000; ++i) \
12 dest[i] += src[i * SCALE]; \
15 #define TEST_TYPE(T, DATA_TYPE) \
16 T (DATA_TYPE, 5, 5) \
17 T (DATA_TYPE, 7, 7) \
18 T (DATA_TYPE, 11, 11) \
19 T (DATA_TYPE, 200, 200) \
20 T (DATA_TYPE, m100, -100)
22 #define TEST_ALL(T) \
23 TEST_TYPE (T, int32_t) \
24 TEST_TYPE (T, uint32_t) \
25 TEST_TYPE (T, float) \
26 TEST_TYPE (T, int64_t) \
27 TEST_TYPE (T, uint64_t) \
28 TEST_TYPE (T, double)
30 TEST_ALL (TEST_LOOP)
32 /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+.s, uxtw\]\n} 12 } } */
33 /* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, z[0-9]+.s, sxtw\]\n} 3 } } */
34 /* { dg-final { scan-assembler-times {\tld1d\tz[0-9]+\.d, p[0-7]/z, \[x[0-9]+, z[0-9]+.d\]\n} 15 } } */