[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / spill_5.c
blob4602a5c128523784de341940eda7ee30a19daab8
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
4 #include <stdint.h>
6 void consumer (void *);
8 #define TEST_LOOP(TYPE, VAL) \
9 void \
10 multi_loop_##TYPE (TYPE *x) \
11 { \
12 for (int i = 0; i < 100; ++i) \
13 x[i] += VAL + i; \
14 consumer (x); \
15 for (int i = 0; i < 100; ++i) \
16 x[i] += VAL + i; \
17 consumer (x); \
18 for (int i = 0; i < 100; ++i) \
19 x[i] += VAL + i; \
20 consumer (x); \
23 TEST_LOOP (uint8_t, 3);
24 TEST_LOOP (uint16_t, 4);
25 TEST_LOOP (uint32_t, 5);
26 TEST_LOOP (uint64_t, 6);
27 TEST_LOOP (float, 2.5f);
28 TEST_LOOP (double, 3.5);
30 /* { dg-final { scan-assembler-times {\tindex\tz[0-9]+\..,} 18 } } */
31 /* { dg-final { scan-assembler-not {\tldr\tz[0-9]} } } */
32 /* { dg-final { scan-assembler-not {\tstr\tz[0-9]} } } */
33 /* { dg-final { scan-assembler-not {\tldr\tp[0-9]} } } */
34 /* { dg-final { scan-assembler-not {\tstr\tp[0-9]} } } */