aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-03-30 12:46:57 -0800
committerRichard Henderson <rth@gcc.gnu.org>2003-03-30 12:46:57 -0800
commite1233a7dc0b2ab2e7d9cb5f0138a9de8f65125e5 (patch)
tree1f8da9ec73c4ebabe1b0846460e0317b29ff02a4 /gcc/cse.c
parent9b703090abb0b72c28ddfe1804d93bc6af5ec6a0 (diff)
downloadgcc-e1233a7dc0b2ab2e7d9cb5f0138a9de8f65125e5.zip
gcc-e1233a7dc0b2ab2e7d9cb5f0138a9de8f65125e5.tar.gz
gcc-e1233a7dc0b2ab2e7d9cb5f0138a9de8f65125e5.tar.bz2
cfgbuild.c (make_edges): Use tablejump_p.
* cfgbuild.c (make_edges): Use tablejump_p. * cfgcleanup.c (label_is_jump_target_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (flow_delete_block_noexpunge): Likewise. (try_redirect_by_replacing_jump): Likewise. (redirect_edge_and_branch): Likewise. * cse.c (fold_rtx): Likewise. * jump.c (delete_related_insns): Likewise. * rtlanal.c (get_jump_table_offset): Likewise. * ssa-ccp.c (ssa_ccp_df_delete_unreachable_insns): Likewise. From-SVN: r65054
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 9f6b96d..94eb8d0 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3352,17 +3352,11 @@ fold_rtx (x, insn)
/* If the next insn is a CODE_LABEL followed by a jump table,
PC's value is a LABEL_REF pointing to that label. That
lets us fold switch statements on the VAX. */
- if (insn && GET_CODE (insn) == JUMP_INSN)
- {
- rtx next = next_nonnote_insn (insn);
-
- if (next && GET_CODE (next) == CODE_LABEL
- && NEXT_INSN (next) != 0
- && GET_CODE (NEXT_INSN (next)) == JUMP_INSN
- && (GET_CODE (PATTERN (NEXT_INSN (next))) == ADDR_VEC
- || GET_CODE (PATTERN (NEXT_INSN (next))) == ADDR_DIFF_VEC))
- return gen_rtx_LABEL_REF (Pmode, next);
- }
+ {
+ rtx next;
+ if (tablejump_p (insn, &next, NULL))
+ return gen_rtx_LABEL_REF (Pmode, next);
+ }
break;
case SUBREG: