Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-peel-1.c
blob2a150e91203f812c942260bfd441cf9959cce987
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options quad_vectors } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 128
9 int ib[N+7];
11 __attribute__ ((noinline))
12 int main1 ()
14 int i;
15 int ia[N+1];
17 /* All the accesses are misaligned. With cost model disabled, we
18 count the number of aligned accesses for each peeling option, and
19 in this case we align the two loads if possible (i.e., if
20 misaligned stores are supported). */
21 for (i = 1; i <= N; i++)
23 ia[i] = ib[i+2] + ib[i+6];
26 /* check results: */
27 for (i = 1; i <= N; i++)
29 if (ia[i] != ib[i+2] + ib[i+6])
30 abort ();
33 return 0;
36 int main (void)
38 int i;
40 check_vect ();
42 for (i = 0; i <= N+6; i++)
44 asm volatile ("" : "+r" (i));
45 ib[i] = i;
48 return main1 ();
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
54 /* { dg-final { cleanup-tree-dump "vect" } } */