aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 90b55b6..4e600c0 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3103,26 +3103,26 @@ rtx_referenced_p (const_rtx x, const_rtx body)
*LABELP and the jump table to *TABLEP. LABELP and TABLEP may be NULL. */
bool
-tablejump_p (const rtx_insn *insn, rtx *labelp, rtx_jump_table_data **tablep)
+tablejump_p (const rtx_insn *insn, rtx_insn **labelp,
+ rtx_jump_table_data **tablep)
{
- rtx label;
- rtx_insn *table;
-
if (!JUMP_P (insn))
return false;
- label = JUMP_LABEL (insn);
- if (label != NULL_RTX && !ANY_RETURN_P (label)
- && (table = NEXT_INSN (as_a <rtx_insn *> (label))) != NULL_RTX
- && JUMP_TABLE_DATA_P (table))
- {
- if (labelp)
- *labelp = label;
- if (tablep)
- *tablep = as_a <rtx_jump_table_data *> (table);
- return true;
- }
- return false;
+ rtx target = JUMP_LABEL (insn);
+ if (target == NULL_RTX || ANY_RETURN_P (target))
+ return false;
+
+ rtx_insn *label = as_a<rtx_insn *> (target);
+ rtx_insn *table = next_insn (label);
+ if (table == NULL_RTX || !JUMP_TABLE_DATA_P (table))
+ return false;
+
+ if (labelp)
+ *labelp = label;
+ if (tablep)
+ *tablep = as_a <rtx_jump_table_data *> (table);
+ return true;
}
/* A subroutine of computed_jump_p, return 1 if X contains a REG or MEM or