diff options
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index f5a82383a00..3fcd8a40357 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -713,7 +713,7 @@ try_redirect_by_replacing_jump (e, target) basic_block src = e->src; rtx insn = src->end, kill_from; edge tmp; - rtx set; + rtx set, table; int fallthru = 0; /* Verify that all targets will be TARGET. */ @@ -723,6 +723,12 @@ try_redirect_by_replacing_jump (e, target) if (tmp || !onlyjump_p (insn)) return false; + if (reload_completed && JUMP_LABEL (insn) + && (table = NEXT_INSN (JUMP_LABEL (insn))) != NULL_RTX + && GET_CODE (table) == JUMP_INSN + && (GET_CODE (PATTERN (table)) == ADDR_VEC + || GET_CODE (PATTERN (table)) == ADDR_DIFF_VEC)) + return false; /* Avoid removing branch with side effects. */ set = single_set (insn); |