Add support for conditional reductions using SVE CLASTB
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / sve / clastb_5_run.c
blob3c9d0542eb4ae4d0abd0b414908b0e946a387ce9
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 #include "clastb_5.c"
6 int __attribute__ ((optimize (1)))
7 main (void)
9 long a[N] = {
10 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
11 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
12 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
13 31, 32
15 __builtin_memset (a + 32, 43, (N - 32) * sizeof (long));
17 long ret = condition_reduction (a, 16);
19 if (ret != 10)
20 __builtin_abort ();
22 return 0;