111
|
1 /* { dg-require-effective-target vect_int } */
|
|
2 /* { dg-add-options bind_pic_locally } */
|
|
3
|
|
4 #include <stdarg.h>
|
|
5 #include "tree-vect.h"
|
|
6
|
|
7 #define N 128
|
|
8
|
|
9 /* unaligned load. */
|
|
10
|
|
11 int ia[N];
|
|
12 int ib[N+1];
|
|
13
|
|
14 __attribute__ ((noinline))
|
|
15 int main1 ()
|
|
16 {
|
|
17 int i;
|
|
18
|
|
19 for (i=0; i <= N; i++)
|
|
20 {
|
|
21 ib[i] = i;
|
|
22 }
|
|
23
|
|
24 for (i = 1; i <= N; i++)
|
|
25 {
|
|
26 ia[i-1] = ib[i];
|
|
27 }
|
|
28
|
|
29 /* check results: */
|
|
30 for (i = 1; i <= N; i++)
|
|
31 {
|
|
32 if (ia[i-1] != ib[i])
|
|
33 abort ();
|
|
34 }
|
|
35
|
|
36 return 0;
|
|
37 }
|
|
38
|
|
39 int main (void)
|
|
40 {
|
|
41 check_vect ();
|
|
42
|
|
43 return main1 ();
|
|
44 }
|
|
45
|
|
46 /* The initialization induction loop (with aligned access) is also vectorized. */
|
|
47 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
|
|
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
|
131
|
49 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
|
111
|
50 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
|