[AArch64] Fix gcc.target/aarch64/vect-reduc-or_1.c for -mcpu=cortex-a57
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / vect-reduc-or_1.c
blob6261e9d1ea6fa8949d392543e08b880477a1ed5d
1 /* { dg-do run } */
2 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-vect-cost-model" } */
3 /* Write a reduction loop to be reduced using whole vector right shift. */
5 extern void abort (void);
7 unsigned char in[8] __attribute__((__aligned__(16)));
9 int
10 main (unsigned char argc, char **argv)
12 unsigned char i = 0;
13 unsigned char sum = 1;
15 for (i = 0; i < 8; i++)
16 in[i] = (i + i + 1) & 0xfd;
18 /* Prevent constant propagation of the entire loop below. */
19 asm volatile ("" : : : "memory");
21 for (i = 0; i < 8; i++)
22 sum |= in[i];
24 if (sum != 13)
26 __builtin_printf ("Failed %d\n", sum);
27 abort ();
30 return 0;
33 /* { dg-final { scan-tree-dump "Reduce using vector shifts" "vect" } } */