Debian Codegraph @

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

raw
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-require-effective-target supports_stack_clash_protection } */
3 /* { dg-options "-O3 -fopenmp-simd -fstack-clash-protection --param stack-clash-protection-guard-size=16" } */
4
5 #include "struct_vect_24.c"
6
7 #undef TEST_LOOP
8 #define TEST_LOOP(NAME, TYPE) \
9 { \
10 TYPE out[N]; \
11 TYPE in[N * 4]; \
12 for (int i = 0; i < N; ++i) \
13 { \
14 out[i] = i * 7 / 2; \
15 asm volatile ("" ::: "memory"); \
16 } \
17 for (int i = 0; i < N * 4; ++i) \
18 { \
19 in[i] = i * 9 / 2; \
20 asm volatile ("" ::: "memory"); \
21 } \
22 NAME (out, in); \
23 for (int i = 0; i < N; ++i) \
24 { \
25 TYPE expected = i * 7 / 2; \
26 if (out[i] != out[0] + expected) \
27 __builtin_abort (); \
28 asm volatile ("" ::: "memory"); \
29 } \
30 }
31
32 int __attribute__ ((optimize (0)))
33 main (void)
34 {
35 TEST (test);
36 return 0;
37 }