aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-09-15 22:24:09 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-09-15 22:24:09 +0000
commit09246242ec08620b1901902459bd26f928a7ad9b (patch)
tree9ebb96c4c9a12bfad9d01234232da4739230e936
parenta177a5590d42dcb6cc23a8f0686c7abe395d219e (diff)
(insert): Set cse_jumps_altered when inserting a LABEL_REF.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@10366 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index cba56febbd2..863a338e7fe 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1287,6 +1287,14 @@ insert (x, classp, hash, mode)
SET_HARD_REG_BIT (hard_regs_in_table, i);
}
+ /* If X is a label, show we are altering jumps. We don't KNOW
+ we are, but we might be putting it into a insn which would
+ then need a new REG_LABEL note. Be conservative and say
+ we alter jumps here; we usually will in this case anyway. */
+ if (GET_CODE (x) == LABEL_REF
+ || (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF))
+ cse_jumps_altered = 1;
/* Put an element for X into the right hash bucket. */