Commit f1e5de9e authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Avoid endless iteration when normalising returns.

[r20155]
parent f3b8448f
......@@ -190,6 +190,8 @@ static int can_move_ret(ir_node *ret) {
/* check, that predecessors are Jmps */
n = get_Block_n_cfgpreds(retbl);
if (n <= 1)
return 0;
for (i = 0; i < n; ++i) {
ir_node *pred = get_Block_cfgpred(retbl, i);
......@@ -202,9 +204,7 @@ static int can_move_ret(ir_node *ret) {
set_Block_cfgpred(retbl, i, jmp);
}
}
/* if we have 0 control flow predecessors, we cannot move :-) */
return n > 0;
return 1;
}
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment