Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/while_7.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=scalable -fno-vect-cost-model" } */
3
4 #include <stdint.h>
5
6 #define ADD_LOOP(TYPE) \
7 TYPE __attribute__ ((noinline, noclone)) \
8 vec_while_##TYPE (TYPE *restrict a) \
9 { \
10 for (int i = 0; i < 8; ++i) \
11 a[i] += 1; \
12 }
13
14 #define TEST_ALL(T) \
15 T (int8_t) \
16 T (int16_t) \
17 T (int32_t) \
18 T (int64_t)
19
20 TEST_ALL (ADD_LOOP)
21
22 /* { dg-final { scan-assembler-times {\tptrue\tp[0-7]\.b, vl8\n} 1 } } */
23 /* { dg-final { scan-assembler-times {\tptrue\tp[0-7]\.h, vl8\n} 1 } } */
24 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.s,} 2 } } */
25 /* { dg-final { scan-assembler-times {\twhilelo\tp[0-7]\.d,} 2 } } */