1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "-fvect-cost-model=dynamic" } */
4 
5 void bar (int *);
foo(int * p,int a,int b)6 int foo (int *p, int a, int b)
7 {
8   int x[4];
9   int tem0, tem1, tem2, tem3;
10   tem0 = p[0] + 1 + a;
11   x[0] = tem0;
12   tem1 = p[1] + 2 + b;
13   x[1] = tem1;
14   tem2 = p[2] + 3 + b;
15   x[2] = tem2;
16   tem3 = p[3] + 4 + a;
17   x[3] = tem3;
18   bar (x);
19   return tem0 + tem1 + tem2 + tem3;
20 }
21 
22 /* { dg-final { scan-tree-dump "vectorization is not profitable" "slp2" { xfail  { vect_no_align && { ! vect_hw_misalign } } } } } */
23