summaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-18 21:33:36 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-18 21:33:36 +0000
commit7a1fee99d00421892caea4d6f0e621ec7527cde7 (patch)
tree1ccec1956d15f6572d3371b13f7ca67d192d41c9 /gcc/cfgrtl.c
parent64ecff31768d8bb4a9dd3860d0a5c07985f67ac9 (diff)
downloadgcc-7a1fee99d00421892caea4d6f0e621ec7527cde7.tar.gz
* cfgrtl.c (force_nonfallthru_and_redirect): Use tablejump_p
to skip the addr_vec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index d197b79380a..903f57eac3f 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1036,19 +1036,16 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
{
/* Create the new structures. */
+ /* If the old block ended with a tablejump, skip its table
+ by searching forward from there. Otherwise start searching
+ forward from the last instruction of the old block. */
+ if (!tablejump_p (e->src->end, NULL, &note))
+ note = e->src->end;
+
/* Position the new block correctly relative to loop notes. */
- note = last_loop_beg_note (e->src->end);
+ note = last_loop_beg_note (note);
note = NEXT_INSN (note);
- /* ... and ADDR_VECs. */
- if (note != NULL
- && GET_CODE (note) == CODE_LABEL
- && NEXT_INSN (note)
- && GET_CODE (NEXT_INSN (note)) == JUMP_INSN
- && (GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_DIFF_VEC
- || GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC))
- note = NEXT_INSN (NEXT_INSN (note));
-
jump_block = create_basic_block (note, NULL, e->src);
jump_block->count = e->count;
jump_block->frequency = EDGE_FREQUENCY (e);