From b0521aab2ddc5426772c92deea432ddee0b3dbbe Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 16 Mar 2011 15:40:01 +0100 Subject: [PATCH] Handle if-conversion within endless loops properly by stopping the recursion when reaching the block with the conditional jump. --- ir/opt/ifconv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.20.1