2014-02-01 Christophe Lyon <christophe.lyon@linaro.org>
[official-gcc.git] / gcc-4_8-branch / gcc / testsuite / gcc.dg / tree-ssa / gen-vect-28.c
blobf314b28d3d48b8b3a4b131de740aff162947e9f9
1 /* { dg-do run { target vect_cmdline_needed } } */
2 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
3 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
5 #include <stdlib.h>
7 #define N 128
8 #define OFF 3
10 /* unaligned store. */
12 int main_1 (int off)
14 int i;
15 char 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 static volatile int off = 1;
34 int main (void)
36 return main_1 (off);
40 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! avr-*-* } } } } */
41 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { target { ! avr-*-* } } } } */
42 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { ! avr-*-* } } } } */
43 /* { dg-final { cleanup-tree-dump "vect" } } */