Don't combine blocks if the first one ends with a Raise.
authorJulian Oppermann <julian.oppermann@student.kit.edu>
Tue, 28 Jun 2011 12:10:08 +0000 (14:10 +0200)
committerJulian Oppermann <julian.oppermann@student.kit.edu>
Tue, 28 Jun 2011 12:14:02 +0000 (14:14 +0200)
ir/opt/combo.c

index 448d2d6..903f875 100644 (file)
@@ -2975,6 +2975,11 @@ static int can_exchange(ir_node *pred, ir_node *block)
                return 0;
        else if (is_Jmp(pred))
                return 1;
+       else if (is_Raise(pred)) {
+               /* Raise is a tuple and usually has only one reachable ProjX,
+                * but it must not be eliminated like a Jmp */
+               return 0;
+       }
        else if (get_irn_mode(pred) == mode_T) {
                /* if the predecessor block has more than one
                   reachable outputs we cannot remove the block */