Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / vect / vect-28.c
blob794a7c8f438061a52fd74ae7c6c82b7928c298d0
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
7 #define OFF 3
9 /* unaligned store. */
11 __attribute__ ((noinline))
12 int main1 (int off)
14 int i;
15 int ia[N+OFF];
17 for (i = 0; i < N; i++)
19 ia[i+off] = 5;
22 /* check results: */
23 for (i = 0; i < N; i++)
25 if (ia[i+off] != 5)
26 abort ();
29 return 0;
32 int main (void)
34 check_vect ();
36 main1 (0); /* aligned */
37 main1 (OFF); /* unaligned */
38 return 0;
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
43 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vector_alignment_reachable } } } } */
44 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
45 /* { dg-final { cleanup-tree-dump "vect" } } */