summaryrefslogtreecommitdiff
path: root/gcc/loop-iv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r--gcc/loop-iv.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 01df85a7264..55faf4a7097 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1781,8 +1781,6 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
while (1)
{
- basic_block tmp_bb;
-
insn = BB_END (e->src);
if (any_condjump_p (insn))
{
@@ -1814,14 +1812,10 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
}
}
- /* This is a bit subtle. Store away e->src in tmp_bb, since we
- modify `e' and this can invalidate the subsequent count of
- e->src's predecessors by looking at the wrong block. */
- tmp_bb = e->src;
- e = EDGE_PRED (tmp_bb, 0);
- if (EDGE_COUNT (tmp_bb->preds) > 1
- || e->src == ENTRY_BLOCK_PTR)
+ if (!single_pred_p (e->src)
+ || single_pred (e->src) == ENTRY_BLOCK_PTR)
break;
+ e = single_pred_edge (e->src);
}
FREE_REG_SET (altered);