Debian Codegraph @

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

raw
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
3
4 #include "vcond_12.c"
5
6 #define TEST_LOOP(TYPE, CMPTYPE, OP) \
7 { \
8 TYPE dest[N]; \
9 CMPTYPE cond[N]; \
10 for (unsigned int i = 0; i < N; ++i) \
11 cond[i] = i % 5; \
12 TYPE src2v = 14; \
13 TYPE elsev = 17; \
14 f_##OP##_##TYPE (dest, cond, 3, src2v, elsev); \
15 TYPE induc = 0; \
16 for (unsigned int i = 0; i < N; ++i) \
17 { \
18 TYPE if_true = OP (induc, src2v); \
19 if (dest[i] != (i % 5 < 3 ? if_true : elsev)) \
20 __builtin_abort (); \
21 induc += 1; \
22 } \
23 }
24
25 int __attribute__ ((optimize (1)))
26 main (void)
27 {
28 FOR_EACH_LOOP (TEST_LOOP);
29 return 0;
30 }