diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-19 20:36:43 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-19 20:36:43 +0000 |
commit | 9971f6477aed47bc55355658e90db11a2428288f (patch) | |
tree | b23e607d783381144b9fc87ba70206d9b1111f68 /gcc/reorg.c | |
parent | 09a1f31f7002d29cbe2b3002168fefa0c632548a (diff) | |
download | gcc-9971f6477aed47bc55355658e90db11a2428288f.tar.gz |
PR rtl-optimization/51187
* reorg.c (relax_delay_slots): Do not consider a jump useless if there
is a barrier between the jump and its target label.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181513 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r-- | gcc/reorg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index 40d73a76a71..0b90550add5 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -3600,9 +3600,11 @@ relax_delay_slots (rtx first) } } + /* See if we have a simple (conditional) jump that is useless. */ if (! INSN_ANNULLED_BRANCH_P (delay_insn) - && prev_active_insn (target_label) == insn && ! condjump_in_parallel_p (delay_insn) + && prev_active_insn (target_label) == insn + && ! BARRIER_P (prev_nonnote_insn (target_label)) #ifdef HAVE_cc0 /* If the last insn in the delay slot sets CC0 for some insn, various code assumes that it is in a delay slot. We could |