Merge branches/gcc-4_9-branch rev 225109.
[official-gcc.git] / gcc-4_9-branch / gcc / testsuite / gcc.dg / vect / vect-96.c
blob7d8c92a5489b5c168c4d82765037a717af63605d
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options double_vectors } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 struct tmp
11 int x;
12 int ia[N];
15 __attribute__ ((noinline))
16 int main1 (int off)
18 struct tmp sb[N];
19 struct tmp *pp = &sb[off];
20 int i, ib[N];
22 for (i = 0; i < N; i++)
23 pp->ia[i] = ib[i];
25 /* check results: */
26 for (i = 0; i < N; i++)
28 if (pp->ia[i] != ib[i])
29 abort();
32 return 0;
35 int main (void)
37 check_vect ();
39 return main1 (8);
42 /* The store is unaligned, the load is aligned. For targets that support unaligned
43 loads, peel to align the store and generate an unaligned access for the load.
44 For targets that don't support unaligned loads, version for the store. */
46 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
47 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { {! vect_no_align} && vector_alignment_reachable } } } } */
48 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
49 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */