aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMichael Meissner <meissner@gcc.gnu.org>1997-03-06 22:28:22 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1997-03-06 22:28:22 +0000
commite035031935a5160976ef3cf0b626701df1c3fd23 (patch)
tree6828b66b5dfa819e744b0da6eacac137c7e7833d /gcc
parentdfcf98915cfd438777af1990365da4d50b3d0328 (diff)
downloadgcc-e035031935a5160976ef3cf0b626701df1c3fd23.zip
gcc-e035031935a5160976ef3cf0b626701df1c3fd23.tar.gz
gcc-e035031935a5160976ef3cf0b626701df1c3fd23.tar.bz2
Do not emit USE on a LABEL_REF
From-SVN: r13695
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 3f932e6..61d16a1 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5164,8 +5164,12 @@
{
/* Emit a USE operation so that the constant isn't deleted if
expensive optimizations are turned on because nobody
- references it */
- emit_insn (gen_rtx (USE, VOIDmode, operands[1]));
+ references it. This should only be done for operands that
+ contain SYMBOL_REFs with CONSTANT_POOL_ADDRESS_P set.
+ This should not be done for operands that contain LABEL_REFs.
+ For now, we just handle the obvious case. */
+ if (GET_CODE (operands[1]) != LABEL_REF)
+ emit_insn (gen_rtx (USE, VOIDmode, operands[1]));
/* If we are to limit the number of things we put in the TOC and
this is a symbol plus a constant we can add in one insn,