Do not mark the transformed as visited. It makes no sense at all.
[libfirm] / ir / be / test / confirm.c
index 154a1f5..ec20e88 100644 (file)
@@ -1,5 +1,16 @@
 #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);
@@ -7,6 +18,7 @@ int xtest(int x) {
        if (x) {
                printf("%d\n", x);
        }
+       return x;
 }
 
 int test(int a, int b) {
@@ -38,6 +50,7 @@ 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("test2() = %d\n", test2(1, 3));