* gcc.dg/torture/stackalign/builtin-apply-2.c: Fix skip-if syntax.
[official-gcc.git] / gcc / testsuite / gcc.dg / graphite / fuse-2.c
blobf4cea4360d9e5deb8a73ff5c145b8e9cfb243995
1 /* Check that the three loops are fused. */
3 /* Make sure we fuse the loops like this:
4 AST generated by isl:
5 for (int c0 = 0; c0 <= 99; c0 += 1) {
6 S_3(c0);
7 S_6(c0);
8 S_9(c0);
12 /* { dg-final { scan-tree-dump-times "AST generated by isl:.*for \\(int c0 = 0; c0 <= 99; c0 \\+= 1\\) \\{.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*S_.*\\(c0\\);.*\\}" 1 "graphite" } } */
14 #define MAX 100
15 int A[MAX], B[MAX], C[MAX];
17 extern void abort ();
19 int
20 main (void)
22 int i;
24 /* The next three loops should be fused. */
25 for (i = 0; i < MAX; i++)
27 A[i] = i;
28 B[i] = i + 2;
29 C[i] = i + 1;
31 for(i=0; i<MAX; i++)
32 A[i] += B[i];
33 for(i=0; i<MAX; i++)
34 A[i] += C[i];
36 for (i = 0; i < MAX; i++)
37 if (A[i] != 3*i+3)
38 abort ();
40 return 0;