OSDN Git Service

* gcc.target/i386/sse-17.c: Include sse2-check.h.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-96.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 16
7
8 struct tmp
9 {
10      int x;
11      int ia[N];
12 };
13
14 __attribute__ ((noinline))
15 int main1 (int off)
16 {
17   struct tmp sb[N];
18   struct tmp *pp = &sb[off];
19   int i, ib[N];
20
21   for (i = 0; i < N; i++)
22       pp->ia[i] = ib[i];
23
24   /* check results: */  
25   for (i = 0; i < N; i++)
26     {
27        if (pp->ia[i] != ib[i])
28          abort();
29     }
30
31   return 0;
32 }
33
34 int main (void)
35
36   check_vect ();
37
38   return main1 (8);
39 }
40
41 /* The store is unaligned, the load is aligned. For targets that support unaligned
42    loads, peel to align the store and generate an unaligned access for the load.
43    For targets that don't support unaligned loads, version for the store.  */
44
45 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
46 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
47 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || {! vector_alignment_reachable} } } } } */
48 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */
49 /* { dg-final { cleanup-tree-dump "vect" } } */