* gcc.dg/vect/vect-22.c: Require vect_float.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-91.c
blob6741519bcfa5dd9207a451fb098e85cd8938ea91
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 256
9 extern int a[N];
11 /* The alignment of 'pa' is unknown.
12 Yet we do know that both the read access and write access have
13 the same alignment. Peeling to align one of the accesses will
14 align the other. */
16 int
17 main1 (int * pa)
19 int i;
21 for (i = 0; i < N; i++)
23 pa[i] = pa[i] + 1;
26 return 0;
29 /* The alignment of 'a' is unknown.
30 Yet we do know that both the read access and write access have
31 the same alignment. Peeling to align one of the accesses will
32 align the other. */
34 int
35 main2 ()
37 int i;
39 for (i = 0; i < N; i++)
41 a[i] = a[i] + 1;
44 return 0;
47 int
48 main3 ()
50 int i;
52 for (i = 0; i < N; i++)
54 a[i] = a[i+20];
57 return 0;
60 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
61 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
62 /* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" } } */
63 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" } } */
64 /* { dg-final { cleanup-tree-dump "vect" } } */