summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index e8c2b5f89b9..408f7aff4fe 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1973,7 +1973,7 @@ find_if_block (test_bb, then_edge, else_edge)
basic_block join_bb = NULL_BLOCK;
edge then_succ = then_bb->succ;
edge else_succ = else_bb->succ;
- int next_index;
+ basic_block next;
/* The THEN block of an IF-THEN combo must have exactly one predecessor. */
if (then_bb->pred->pred_next != NULL_EDGE)
@@ -2057,10 +2057,10 @@ find_if_block (test_bb, then_edge, else_edge)
/* ??? As an enhancement, move the ELSE block. Have to deal with
BLOCK notes, if by no other means than aborting the merge if they
exist. Sticky enough I don't want to think about it now. */
- next_index = then_bb->index;
- if (else_bb && ++next_index != else_bb->index)
+ next = then_bb;
+ if (else_bb && (next = next->next_bb) != else_bb)
return FALSE;
- if (++next_index != join_bb->index && join_bb->index != EXIT_BLOCK)
+ if ((next = next->next_bb) != join_bb && join_bb != EXIT_BLOCK_PTR)
{
if (else_bb)
join_bb = NULL;
@@ -2146,7 +2146,7 @@ find_cond_trap (test_bb, then_edge, else_edge)
/* If the non-trap block and the test are now adjacent, merge them.
Otherwise we must insert a direct branch. */
- if (test_bb->index + 1 == other_bb->index)
+ if (test_bb->next_bb == other_bb)
{
delete_insn (jump);
merge_if_block (test_bb, NULL, NULL, other_bb);