From: Christoph Mallon Date: Wed, 16 Mar 2011 14:40:01 +0000 (+0100) Subject: Handle if-conversion within endless loops properly by stopping the recursion when... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b0521aab2ddc5426772c92deea432ddee0b3dbbe;p=libfirm Handle if-conversion within endless loops properly by stopping the recursion when reaching the block with the conditional jump. --- diff --git a/ir/opt/ifconv.c b/ir/opt/ifconv.c index 714d4cf12..b5c453e32 100644 --- a/ir/opt/ifconv.c +++ b/ir/opt/ifconv.c @@ -261,7 +261,7 @@ static void prepare_path(ir_node* block, int i, const ir_node* dependency) for (j = 0; j < pred_arity; ++j) { ir_node* pred_pred = get_nodes_block(get_irn_n(pred, j)); - if (is_cdep_on(pred_pred, dependency)) { + if (pred_pred != dependency && is_cdep_on(pred_pred, dependency)) { prepare_path(pred, j, dependency); split_block(block, i, j); break; @@ -294,8 +294,6 @@ restart: ir_node* cond; int j; - if (dependency == block) continue; - if (projx0 == NULL) continue; cond = get_Proj_pred(projx0);