fix switch lowerer messing up default_proj in some cases
authorMatthias Braun <matze@braunis.de>
Fri, 17 Jun 2011 19:33:28 +0000 (21:33 +0200)
committerMatthias Braun <matze@braunis.de>
Fri, 17 Jun 2011 21:23:01 +0000 (23:23 +0200)
ir/lower/lower_switch.c

index 56adc79..0856cae 100644 (file)
@@ -255,13 +255,7 @@ static void create_out_of_bounds_check(cond_env_t *env, ir_node *cond)
                long pn     = get_Proj_proj(proj);
                long new_pn = pn - delta;
                if (pn == default_pn) {
-                       /* we might have to choose a new default_pn */
-                       if (pn < env->switch_max) {
-                               new_pn = env->switch_max + 1;
-                               set_Cond_default_proj(cond, new_pn);
-                       } else {
-                               new_pn = default_pn;
-                       }
+                       set_Cond_default_proj(cond, new_pn);
                        ARR_APP1(ir_node*, default_preds, proj);
                }