1 /* { dg-require-effective-target vect_float } */
8 __attribute__ ((noinline))
9 void bar (float *pa, float *pb, float *pc)
14 for (i = 0; i < N; i++)
16 if (pa[i] != (pb[i] * pc[i]))
24 __attribute__ ((noinline)) int
28 float pb[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
29 float pc[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
31 /* Vectorizable: pa may not alias pb and/or pc, even though their
32 addresses escape. &pa would need to escape to point to escaped memory. */
33 for (i = 0; i < N; i++)
35 pa[i] = pb[i] * pc[i];
43 __attribute__ ((noinline)) int
47 float pb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
48 float pc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
50 /* Vectorizable: pb and pc addresses do not escape. */
51 for (i = 0; i < N; i++)
53 pa[i] = pb[i] * pc[i];
57 for (i = 0; i < N; i++)
59 if (pa[i] != (pb[i] * pc[i]))
69 float a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
78 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" } } */
79 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target vect_no_align } } } */
80 /* { dg-final { cleanup-tree-dump "vect" } } */