Example for optimizing non-strict programs using combo.
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Oct 2008 17:14:06 +0000 (17:14 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 21 Oct 2008 17:14:06 +0000 (17:14 +0000)
[r23083]

ir/be/test/unknown_combo.c

index 345385d..2c77688 100644 (file)
@@ -7,5 +7,15 @@ int main() {
                printf("x == 2\n");
        if (x == 3)
                printf("x == 3\n");
                printf("x == 2\n");
        if (x == 3)
                printf("x == 3\n");
+
+       switch (x) {
+       case 1:
+               printf("Case 1\n");
+               break;
+       case 2:
+               printf("Case 1\n");
+               break;
+       }
+
        return 0;
 }
        return 0;
 }