Add compile command to each testcase
[gcc-vect-testsuite.git] / no-scevccp-vect-iv-2.c
blobadca5cba59cf93cd8dc4f909d390f39811caf8dd
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 __attribute__ ((noinline))
9 int main1 ()
11 int arr1[N];
12 int k = 0;
13 int m = 3, i = 0;
15 /* Vectorization of induction that is used after the loop.
16 Currently vectorizable because scev_ccp disconnects the
17 use-after-the-loop from the iv def inside the loop. */
19 do {
20 k = k + 2;
21 arr1[i] = k;
22 m = m + k;
23 i++;
24 } while (i < N);
26 /* check results: */
27 for (i = 0; i < N; i++)
29 if (arr1[i] != 2+2*i)
30 abort ();
33 return m + k;
36 int main (void)
38 int res;
40 check_vect ();
42 res = main1 ();
43 if (res != 32 + 275)
44 abort ();
46 return 0;
49 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */