revert accidental commit of makereport
[libfirm] / ir / be / test / vandrunen.c
1 #include <stdio.h>
2
3 int T6, T10, T13;
4
5 /*
6  * The VanDrunen example for testimng GVN-PRE.
7  * Compile with -f no-const-fold to get the same result ...
8  */
9 int vandrunen(int t1, int c1, int t11)
10 {
11   int t12;
12   int t9;
13   int t8;
14   int t7;
15   int t5;
16   int t4;
17   int t3;
18   int t2;
19
20   t2 = t1;
21
22   for (;;) {
23     t3 = t2 + 1;
24     if (t3 > 50)
25       return 0;
26
27     if (c1 != 0) {
28       t4 = t2 + t3;
29       t5 = t4;
30       T6 = t1 + t5;
31       t8 = t1;
32     } else {
33       t7 = t3 + 1;
34       t8 = t7;
35     }
36     t9 = t2 + t3;
37     T10 = t9 + t8;
38     t12 = t9 + t11;
39     T13 = t12 + t3;
40     t2 = t3;
41   }
42 }
43
44 int main(int argc, char *argv[]) {
45   vandrunen(10, argc & 1, 1);
46   printf("%d %d %d\n", T6, T10, T13);
47   return 0;
48 }