Do not mark the transformed as visited. It makes no sense at all.
[libfirm] / ir / be / test / confirm.c
index 549db69..ec20e88 100644 (file)
@@ -1,5 +1,26 @@
 #include <stdio.h>
 
+int looptest(int x) {
+       while (x) {
+               printf("%d\n", x);
+       }
+       if (x) {
+               printf("%d\n", x);
+       }
+       return x;
+}
+
+
+int xtest(int x) {
+       if (x) {
+               printf("%d\n", x);
+       }
+       if (x) {
+               printf("%d\n", x);
+       }
+       return x;
+}
+
 int test(int a, int b) {
        int x = a * b;
        if (a == 0)
@@ -29,8 +50,10 @@ int test3(int a, int b) {
 }
 
 int main(void) {
+       looptest(0);
+       printf("xtest() = %d\n", xtest(1));
        printf("test() = %d\n", test(0, 1));
-       printf("test() = %d\n", test2(1, 3));
-       printf("test() = %d\n", test3(-3, 3));
+       printf("test2() = %d\n", test2(1, 3));
+       printf("test3() = %d\n", test3(-3, 3));
        return 0;
 }