1 /* { dg-require-effective-target vect_int } */
5 int __attribute__((noipa
))
6 bar (unsigned int *x
, int n
)
9 x
= __builtin_assume_aligned (x
, __BIGGEST_ALIGNMENT__
);
10 for (int i
= 0; i
< n
; ++i
)
11 sum
+= x
[i
*4+0]+ x
[i
*4 + 1] + x
[i
*4 + 2] + x
[i
*4 + 3];
18 static int a
[16] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)))
19 = { 1, 3, 5, 8, 9, 10, 17, 18, 23, 29, 30, 55, 42, 2, 3, 1 };
21 if (bar (a
, 4) != 260)
26 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
27 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" } } */
28 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */