1 /* { dg-require-effective-target vect_float } */
8 typedef float afloat __attribute__ ((__aligned__(16)));
10 /* known misalignment: same alignment */
13 main1 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
17 for (i = 0; i < 5; i++)
19 pa[i+1] = pb[i+1] * pc[i+1];
23 for (i = 0; i < 5; i++)
25 if (pa[i+1] != (pb[i+1] * pc[i+1]))
33 main2 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc)
37 for (i = 0; i < 6; i++)
39 pa[i+1] = pb[i+1] * pc[i+1];
43 for (i = 0; i < 6; i++)
45 if (pa[i+1] != (pb[i+1] * pc[i+1]))
53 main3 (afloat * __restrict__ pa, afloat * __restrict__ pb, afloat * __restrict__ pc, int n)
57 for (i = 0; i < n; i++)
59 pa[i+1] = pb[i+1] * pc[i+1];
63 for (i = 0; i < n; i++)
65 if (pa[i+1] != (pb[i+1] * pc[i+1]))
76 afloat b[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
77 afloat c[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
88 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */
89 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
90 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" } } */