aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorGraham Stott <grahams@redhat.com>2001-11-07 12:57:17 +0000
committerGraham Stott <grahams@gcc.gnu.org>2001-11-07 12:57:17 +0000
commit8fb1e50e912ce7132fb701a1ff007414ca5c4a3e (patch)
treeb79621d5753791cf4ad13656630fd5b9cfbd35d4 /gcc/cse.c
parentb972dd0201d69cfd0a422292706c1d0b8b4f1b2d (diff)
downloadgcc-8fb1e50e912ce7132fb701a1ff007414ca5c4a3e.zip
gcc-8fb1e50e912ce7132fb701a1ff007414ca5c4a3e.tar.gz
gcc-8fb1e50e912ce7132fb701a1ff007414ca5c4a3e.tar.bz2
* cse.c (cse_insn): Emit BARRIER after unconditional jump.
From-SVN: r46824
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index ad6c620..e0c5fb0 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5767,6 +5767,11 @@ cse_insn (insn, libcall_insn)
be a conditional or computed branch. */
else if (dest == pc_rtx && GET_CODE (src) == LABEL_REF)
{
+ /* Now emit a BARRIER after the unconditional jump. */
+ if (NEXT_INSN (insn) == 0
+ || GET_CODE (NEXT_INSN (insn)) != BARRIER)
+ emit_barrier_after (insn);
+
/* We reemit the jump in as many cases as possible just in
case the form of an unconditional jump is significantly
different than a computed jump or conditional jump.
@@ -5777,20 +5782,23 @@ cse_insn (insn, libcall_insn)
if (n_sets == 1)
{
rtx new = emit_jump_insn_before (gen_jump (XEXP (src, 0)), insn);
+
JUMP_LABEL (new) = XEXP (src, 0);
LABEL_NUSES (XEXP (src, 0))++;
insn = new;
+
+ /* Now emit a BARRIER after the unconditional jump. */
+ if (NEXT_INSN (insn) == 0
+ || GET_CODE (NEXT_INSN (insn)) != BARRIER)
+ emit_barrier_after (insn);
}
else
INSN_CODE (insn) = -1;
never_reached_warning (insn);
- /* Now emit a BARRIER after the unconditional jump. Do not bother
- deleting any unreachable code, let jump/flow do that. */
- if (NEXT_INSN (insn) != 0
- && GET_CODE (NEXT_INSN (insn)) != BARRIER)
- emit_barrier_after (insn);
+ /* Do not bother deleting any unreachable code,
+ let jump/flow do that. */
cse_jumps_altered = 1;
sets[i].rtl = 0;