1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fvect-cost-model=dynamic" } */
6 int __attribute__((noipa
))
7 foo (int * __restrict__ x
, int *p
, int a
, int b
)
9 p
= __builtin_assume_aligned (p
, __BIGGEST_ALIGNMENT__
);
10 x
= __builtin_assume_aligned (x
, __BIGGEST_ALIGNMENT__
);
11 int tem0
, tem1
, tem2
, tem3
;
28 int x
[4] __attribute__((aligned(__BIGGEST_ALIGNMENT__
)));
29 int p
[4] __attribute__((aligned(__BIGGEST_ALIGNMENT__
))) = { 0, 1, 2, 3 };
35 if (foo (x
, p
, 7, 13) != 56)
37 if (x
[0] != 8 || x
[1] != 16 || x
[2] != 18 || x
[3] != 14)
42 /* This is a weak test but we want to re-use the arithmetic for both the
43 store and the reduction. */
44 /* { dg-final { scan-tree-dump "re-using SLP tree" "slp2" { target { x86_64-*-* i?86-*-* } } } } */
45 /* On i386 we vectorize both the store and the reduction. */
46 /* { dg-final { scan-tree-dump-times "basic block part vectorized" 2 "slp2" { target { x86_64-*-* i?86-*-* } } } } */