summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c')
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c b/gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c
index 2eb2a5ff07e..e0fe656859d 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve_slp_4_run.c
@@ -9,7 +9,10 @@
{ \
TYPE a[N], b[8] = { 99, 11, 17, 80, 63, 37, 24, 81 }; \
for (unsigned int i = 0; i < N; ++i) \
- a[i] = i * 2 + i % 5; \
+ { \
+ a[i] = i * 2 + i % 5; \
+ asm volatile ("" ::: "memory"); \
+ } \
vec_slp_##TYPE (a, N / 8); \
for (unsigned int i = 0; i < N; ++i) \
{ \
@@ -20,7 +23,7 @@
} \
}
-int
+int __attribute__ ((optimize (1)))
main (void)
{
TEST_ALL (HARNESS)