1 /* { dg-require-effective-target vect_float } */
8 float pa
[N
] __attribute__ ((__aligned__(16)));
9 float pb
[N
] __attribute__ ((__aligned__(16))) = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57};
10 float pc
[N
] __attribute__ ((__aligned__(16))) = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19};
12 /* Check handling of unaligned accesses when the misalignment is
13 known at compile time and different accesses have the same
14 misalignment (e.g. peeling to align one access will align all
15 accesses with the same misalignment. Also, the number of
16 peeled iterations is known in this case, and the vectorizer
17 can use this information (generate prolog and epilog loops
18 with known number of iterations, and only if needed). */
25 for (i
= 0; i
< 5; i
++)
27 pa
[i
+1] = pb
[i
+1] * pc
[i
+1];
31 for (i
= 0; i
< 5; i
++)
33 if (pa
[i
+1] != (pb
[i
+1] * pc
[i
+1]))
45 for (i
= 0; i
< 6; i
++)
47 pa
[i
+1] = pb
[i
+1] * pc
[i
+1];
51 for (i
= 0; i
< 6; i
++)
53 if (pa
[i
+1] != (pb
[i
+1] * pc
[i
+1]))
65 for (i
= 0; i
< n
; i
++)
67 pa
[i
+1] = pb
[i
+1] * pc
[i
+1];
71 for (i
= 0; i
< n
; i
++)
73 if (pa
[i
+1] != (pb
[i
+1] * pc
[i
+1]))
93 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */
94 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
95 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" } } */
96 /* { dg-final { cleanup-tree-dump "vect" } } */