diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-11-19 20:36:43 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-11-19 20:36:43 +0000 |
commit | b168ced90319bca53a0057dabf9786cc341c6c43 (patch) | |
tree | b23e607d783381144b9fc87ba70206d9b1111f68 /gcc/reorg.c | |
parent | 2e85d5e290aadb0cd0c50ddfcd8ba4f58c2301e7 (diff) | |
download | gcc-b168ced90319bca53a0057dabf9786cc341c6c43.tar.gz |
re PR rtl-optimization/51187 (miscompilation of genrecog.c at -O2 for --target=avr)
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.
From-SVN: r181513
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 |