Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-peel-2.c
blob126c2cf1139131535722eea55411c39d277f6002
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 /* unaligned store. */
11 int ib[N+7];
13 __attribute__ ((noinline))
14 int main1 ()
16 int i;
17 int ia[N+1];
19 /* The store is aligned and the loads are misaligned with the same
20 misalignment. Cost model is disabled. If misaligned stores are supported,
21 we peel according to the loads to align them. */
22 for (i = 0; i <= N; i++)
24 ia[i] = ib[i+2] + ib[i+6];
27 /* check results: */
28 for (i = 1; i <= N; i++)
30 if (ia[i] != ib[i+2] + ib[i+6])
31 abort ();
34 return 0;
37 int main (void)
39 int i;
41 check_vect ();
43 for (i = 0; i <= N+6; i++)
45 asm volatile ("" : "+r" (i));
46 ib[i] = i;
49 return main1 ();
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_element_align } } } */
54 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target vect_element_align } } } */
55 /* { dg-final { cleanup-tree-dump "vect" } } */