111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2 /* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
|
|
3
|
|
4 #include <stdarg.h>
|
|
5 #include "tree-vect.h"
|
|
6
|
|
7 #define N 128
|
|
8 #define OFF 3
|
|
9
|
|
10 /* unaligned store. */
|
|
11
|
|
12 __attribute__ ((noinline))
|
|
13 int main1 (int off)
|
|
14 {
|
|
15 int i;
|
|
16 int ia[N+OFF];
|
|
17
|
|
18 for (i = 0; i < N; i++)
|
|
19 {
|
|
20 ia[i+off] = 5;
|
|
21 }
|
|
22
|
|
23 /* check results: */
|
|
24 for (i = 0; i < N; i++)
|
|
25 {
|
|
26 if (ia[i+off] != 5)
|
|
27 abort ();
|
|
28 }
|
|
29
|
|
30 return 0;
|
|
31 }
|
|
32
|
|
33 int main (void)
|
|
34 {
|
|
35 check_vect ();
|
|
36
|
|
37 main1 (0); /* aligned */
|
|
38 main1 (OFF); /* unaligned */
|
|
39 return 0;
|
|
40 }
|
|
41
|
|
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
|
|
43 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
|