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)));
10 main (unsigned char argc
, char **argv
)
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
++)
26 __builtin_printf ("Failed %d\n", sum
);
33 /* { dg-final { scan-tree-dump "Reduce using vector shifts" "vect" } } */