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 #pragma GCC target "+nosve"
7 extern void abort (void);
9 unsigned char in
[8] __attribute__((__aligned__(16)));
12 main (unsigned char argc
, char **argv
)
15 unsigned char sum
= 1;
17 for (i
= 0; i
< 8; i
++)
18 in
[i
] = (i
+ i
+ 1) & 0xfd;
20 /* Prevent constant propagation of the entire loop below. */
21 asm volatile ("" : : : "memory");
23 for (i
= 0; i
< 8; i
++)
28 __builtin_printf ("Failed %d\n", sum
);
35 /* { dg-final { scan-tree-dump "Reduce using vector shifts" "vect" } } */