summaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 8801b8f53f6..8367316847f 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -269,8 +269,7 @@ cond_exec_process_insns (ce_if_block_t *ce_info ATTRIBUTE_UNUSED,
if (NOTE_P (insn))
goto insn_done;
- if (!NONJUMP_INSN_P (insn) && !CALL_P (insn))
- abort ();
+ gcc_assert(NONJUMP_INSN_P (insn) || CALL_P (insn));
/* Remove USE insns that get in the way. */
if (reload_completed && GET_CODE (PATTERN (insn)) == USE)
@@ -2228,30 +2227,21 @@ merge_if_block (struct ce_if_block * ce_info)
/* The outgoing edge for the current COMBO block should already
be correct. Verify this. */
if (EDGE_COUNT (combo_bb->succs) == 0)
- {
- if (find_reg_note (last, REG_NORETURN, NULL))
- ;
- else if (NONJUMP_INSN_P (last)
- && GET_CODE (PATTERN (last)) == TRAP_IF
- && TRAP_CONDITION (PATTERN (last)) == const_true_rtx)
- ;
- else
- abort ();
- }
+ gcc_assert (find_reg_note (last, REG_NORETURN, NULL)
+ || (NONJUMP_INSN_P (last)
+ && GET_CODE (PATTERN (last)) == TRAP_IF
+ && (TRAP_CONDITION (PATTERN (last))
+ == const_true_rtx)));
+ else
/* There should still be something at the end of the THEN or ELSE
blocks taking us to our final destination. */
- else if (JUMP_P (last))
- ;
- else if (EDGE_SUCC (combo_bb, 0)->dest == EXIT_BLOCK_PTR
- && CALL_P (last)
- && SIBLING_CALL_P (last))
- ;
- else if ((EDGE_SUCC (combo_bb, 0)->flags & EDGE_EH)
- && can_throw_internal (last))
- ;
- else
- abort ();
+ gcc_assert (JUMP_P (last)
+ || (EDGE_SUCC (combo_bb, 0)->dest == EXIT_BLOCK_PTR
+ && CALL_P (last)
+ && SIBLING_CALL_P (last))
+ || ((EDGE_SUCC (combo_bb, 0)->flags & EDGE_EH)
+ && can_throw_internal (last)));
}
/* The JOIN block may have had quite a number of other predecessors too.
@@ -2259,7 +2249,7 @@ merge_if_block (struct ce_if_block * ce_info)
have only one remaining edge from our if-then-else diamond. If there
is more than one remaining edge, it must come from elsewhere. There
may be zero incoming edges if the THEN block didn't actually join
- back up (as with a call to abort). */
+ back up (as with a call to a non-return function). */
else if (EDGE_COUNT (join_bb->preds) < 2
&& join_bb != EXIT_BLOCK_PTR)
{
@@ -2626,7 +2616,7 @@ find_if_block (struct ce_if_block * ce_info)
we checked the FALLTHRU flag, those are already adjacent to the last IF
block. */
/* ??? As an enhancement, move the ELSE block. Have to deal with
- BLOCK notes, if by no other means than aborting the merge if they
+ BLOCK notes, if by no other means than backing out the merge if they
exist. Sticky enough I don't want to think about it now. */
next = then_bb;
if (else_bb && (next = next->next_bb) != else_bb)