aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog30
-rw-r--r--gcc/alias.c2
-rw-r--r--gcc/combine.c7
-rw-r--r--gcc/config/alpha/alpha.c3
-rw-r--r--gcc/config/arm/arm.md10
-rw-r--r--gcc/config/h8300/h8300.c2
-rw-r--r--gcc/config/m88k/m88k.c5
-rw-r--r--gcc/config/rs6000/rs6000.c1
-rw-r--r--gcc/cse.c1
-rw-r--r--gcc/emit-rtl.c6
-rw-r--r--gcc/explow.c8
-rw-r--r--gcc/expr.c6
-rw-r--r--gcc/final.c2
-rw-r--r--gcc/function.c3
-rw-r--r--gcc/integrate.c2
-rw-r--r--gcc/optabs.c2
-rw-r--r--gcc/recog.c2
-rw-r--r--gcc/rtl.h7
-rw-r--r--gcc/simplify-rtx.c4
-rw-r--r--gcc/stmt.c1
20 files changed, 41 insertions, 63 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7530fd8..bb92e0d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,33 @@
+Thu May 4 09:45:12 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * rtl.h (MEM_COPY_ATTRIBUTES): Also copy RTX_UNCHANGING_P and
+ MEM_ALIAS_SET.
+ * alias.c (canon_rtx): Don't copy RTX_UNCHANGING_P or MEM_ALIAS_SET
+ when calling MEM_COPY_ATTRIBUTES.
+ * emit-rtl.c (operand_subword, change_address): Likewise.
+ * explow.c (stabilize): Likewise.
+ * expr.c (protect_from_queue, emit_move_insn_1): Likewise.
+ * integrate.c (copy_rtx_and_substitute): Likewise.
+ * combine.c (combine_simplify_rtx): Don't copy RTX_UNCHANGING_P
+ when calling MEM_COPY_ATTRIBUTES.
+ (make_extraction, simplify_shift_const, gen_lowpart_for_combine):
+ Likewise.
+ * cse.c (gen_lowpart_if_possible): Likewise.
+ * function.c (fixup_var_refs_1, purge_addressof_1): Likewise.
+ * optabs.c (gen_move_insn): Likewise.
+ * recog.c (validate_replace_rtx_1): Likewise.
+ * simplify-rtx.c (add_mem_for_addr): Likewise.
+ * stmt.c (expand_anon_union_decl): Likewise.
+ * config/arm/arm.md: Likewise.
+ * config/h8300/h7300.c (fix_bit_operand): Likewise.
+ * config/m88k/m88k.c (legitimize_address, block_move_loop): Likewise.
+ (block_move_no_loop, block_move_sequence): Likewise.
+ * config/rs6000/rs6000.c (expand_block_move_mem): Likewise.
+ * config/alpha/alpha.c (get_aligned_mem): Likewise.
+ Clear MEM_ALIAS_SET.
+ * final.c (alter_subreg): Don't copy MEM_ALIAS_SET when calling
+ MEM_COPY_ATTRIBUTES.
+
2000-05-03 Robert Lipe <robertlipe@usa.net>
* configure.in (i[34567]86-*-isc*) [tmake_file]: Add t-i386bare
diff --git a/gcc/alias.c b/gcc/alias.c
index fb493f8..e29c57e 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -586,9 +586,7 @@ canon_rtx (x)
{
rtx new = gen_rtx_MEM (GET_MODE (x), addr);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (x);
x = new;
}
}
diff --git a/gcc/combine.c b/gcc/combine.c
index 46da6a7..6c14228 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3740,7 +3740,6 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
plus_constant (XEXP (inner, 0),
(SUBREG_WORD (x) * UNITS_PER_WORD
+ endian_offset)));
- RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (inner);
MEM_COPY_ATTRIBUTES (x, inner);
return x;
}
@@ -5922,7 +5921,6 @@ make_extraction (mode, inner, pos, pos_rtx, len,
offset = pos / BITS_PER_UNIT;
new = gen_rtx_MEM (tmode, plus_constant (XEXP (inner, 0), offset));
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (inner);
MEM_COPY_ATTRIBUTES (new, inner);
}
else if (GET_CODE (inner) == REG)
@@ -6147,7 +6145,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
{
rtx newmem = gen_rtx_MEM (wanted_inner_mode,
plus_constant (XEXP (inner, 0), offset));
- RTX_UNCHANGING_P (newmem) = RTX_UNCHANGING_P (inner);
+
MEM_COPY_ATTRIBUTES (newmem, inner);
inner = newmem;
}
@@ -8914,7 +8912,7 @@ simplify_shift_const (x, code, result_mode, varop, input_count)
new = gen_rtx_MEM (tmode,
plus_constant (XEXP (varop, 0),
count / BITS_PER_UNIT));
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (varop);
+
MEM_COPY_ATTRIBUTES (new, varop);
varop = gen_rtx_combine (code == ASHIFTRT ? SIGN_EXTEND
: ZERO_EXTEND, mode, new);
@@ -9669,7 +9667,6 @@ gen_lowpart_for_combine (mode, x)
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
}
new = gen_rtx_MEM (mode, plus_constant (XEXP (x, 0), offset));
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
return new;
}
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 4ea6995..89a08cfe 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1033,11 +1033,10 @@ get_aligned_mem (ref, paligned_mem, pbitnum)
*paligned_mem = gen_rtx_MEM (SImode, plus_constant (base, offset & ~3));
MEM_COPY_ATTRIBUTES (*paligned_mem, ref);
- RTX_UNCHANGING_P (*paligned_mem) = RTX_UNCHANGING_P (ref);
/* Sadly, we cannot use alias sets here because we may overlap other
data in a different alias set. */
- /* MEM_ALIAS_SET (*paligned_mem) = MEM_ALIAS_SET (ref); */
+ MEM_ALIAS_SET (*paligned_mem) = 0;
*pbitnum = GEN_INT ((offset & 3) * 8);
}
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index f83c0e2..0862668 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -3309,10 +3309,8 @@
mem1 = gen_rtx_MEM (QImode, addr);
MEM_COPY_ATTRIBUTES (mem1, operands[1]);
- RTX_UNCHANGING_P (mem1) = RTX_UNCHANGING_P (operands[1]);
mem2 = gen_rtx_MEM (QImode, plus_constant (addr, 1));
MEM_COPY_ATTRIBUTES (mem2, operands[1]);
- RTX_UNCHANGING_P (mem2) = RTX_UNCHANGING_P (operands[1]);
operands[0] = gen_lowpart (SImode, operands[0]);
operands[1] = mem1;
operands[2] = gen_reg_rtx (SImode);
@@ -3427,7 +3425,6 @@
operands[3] = gen_rtx_REG (SImode, REGNO (operands[0]));
operands[2] = gen_rtx_MEM (QImode, operands[3]);
MEM_COPY_ATTRIBUTES (operands[2], operands[1]);
- RTX_UNCHANGING_P (operands[2]) = RTX_UNCHANGING_P (operands[1]);
operands[1] = XEXP (operands[1], 0);
if (GET_CODE (operands[1]) == PLUS
&& GET_CODE (XEXP (operands[1], 1)) == CONST_INT
@@ -3522,7 +3519,6 @@
operands[2] = gen_rtx_MEM (QImode, operands[0]);
MEM_COPY_ATTRIBUTES (operands[2], operands[1]);
- RTX_UNCHANGING_P (operands[2]) = RTX_UNCHANGING_P (operands[1]);
operands[1] = XEXP (operands[1], 0);
if (GET_CODE (operands[1]) == PLUS
&& GET_CODE (XEXP (operands[1], 1)) == CONST_INT
@@ -4201,7 +4197,6 @@
new = gen_rtx_MEM (SImode,
plus_constant (base, new_offset));
MEM_COPY_ATTRIBUTES (new, operands[1]);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (operands[1]);
emit_insn (gen_movsi (reg, new));
if (((INTVAL (offset) & 2) != 0)
^ (BYTES_BIG_ENDIAN ? 1 : 0))
@@ -4237,15 +4232,12 @@
new = gen_rtx_MEM (SImode,
plus_constant (base, new_offset));
MEM_COPY_ATTRIBUTES (new, operands[1]);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (operands[1]);
emit_insn (gen_movsi (reg, new));
}
else
{
new = gen_rtx_MEM (SImode, XEXP (operands[1], 0));
MEM_COPY_ATTRIBUTES (new, operands[1]);
- RTX_UNCHANGING_P (new)
- = RTX_UNCHANGING_P (operands[1]);
emit_insn (gen_rotated_loadsi (reg, new));
}
@@ -4393,10 +4385,8 @@
mem1 = gen_rtx_MEM (QImode, addr);
MEM_COPY_ATTRIBUTES (mem1, operands[1]);
- RTX_UNCHANGING_P (mem1) = RTX_UNCHANGING_P (operands[1]);
mem2 = gen_rtx_MEM (QImode, plus_constant (addr, 1));
MEM_COPY_ATTRIBUTES (mem2, operands[1]);
- RTX_UNCHANGING_P (mem2) = RTX_UNCHANGING_P (operands[1]);
operands[0] = gen_lowpart (SImode, operands[0]);
operands[1] = mem1;
operands[2] = gen_reg_rtx (SImode);
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 87b7f19..ee4d0ad 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -2814,7 +2814,6 @@ fix_bit_operand (operands, what, type)
rtx mem = gen_rtx_MEM (GET_MODE (operands[0]),
copy_to_mode_reg (Pmode,
XEXP (operands[0], 0)));
- RTX_UNCHANGING_P (mem) = RTX_UNCHANGING_P (operands[0]);
MEM_COPY_ATTRIBUTES (mem, operands[0]);
operands[0] = mem;
}
@@ -2824,7 +2823,6 @@ fix_bit_operand (operands, what, type)
rtx mem = gen_rtx_MEM (GET_MODE (operands[1]),
copy_to_mode_reg (Pmode,
XEXP (operands[1], 0)));
- RTX_UNCHANGING_P (mem) = RTX_UNCHANGING_P (operands[1]);
MEM_COPY_ATTRIBUTES (mem, operands[0]);
operands[1] = mem;
}
diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c
index 604441a..555d49f 100644
--- a/gcc/config/m88k/m88k.c
+++ b/gcc/config/m88k/m88k.c
@@ -402,7 +402,6 @@ legitimize_address (pic, orig, reg, scratch)
&& GET_CODE (orig) == MEM)
{
new = gen_rtx_MEM (GET_MODE (orig), new);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (orig);
MEM_COPY_ATTRIBUTES (new, orig);
}
return new;
@@ -602,7 +601,6 @@ block_move_loop (dest, dest_mem, src, src_mem, size, align)
gen_rtx_PLUS (Pmode,
gen_rtx_REG (Pmode, 3),
offset_rtx));
- RTX_UNCHANGING_P (value_rtx) = RTX_UNCHANGING_P (src_mem);
MEM_COPY_ATTRIBUTES (value_rtx, src_mem);
emit_insn (gen_call_movstrsi_loop
@@ -659,7 +657,6 @@ block_move_no_loop (dest, dest_mem, src, src_mem, size, align)
gen_rtx_REG (Pmode, 3),
offset_rtx));
- RTX_UNCHANGING_P (value_rtx) = RTX_UNCHANGING_P (src_mem);
MEM_COPY_ATTRIBUTES (value_rtx, src_mem);
value_reg = ((((most - (size - remainder)) / align) & 1) == 0
@@ -730,7 +727,6 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)
srcp = gen_rtx_MEM (MEM_IN_STRUCT_P (src_mem) ? mode[next] : BLKmode,
plus_constant (src, offset_ld));
- RTX_UNCHANGING_P (srcp) = RTX_UNCHANGING_P (src_mem);
MEM_COPY_ATTRIBUTES (srcp, src_mem);
emit_insn (gen_rtx_SET (VOIDmode, temp[next], srcp));
offset_ld += amount[next];
@@ -744,7 +740,6 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)
= gen_rtx_MEM (MEM_IN_STRUCT_P (dest_mem) ? mode[phase] : BLKmode,
plus_constant (dest, offset_st));
- RTX_UNCHANGING_P (dstp) = RTX_UNCHANGING_P (dest_mem);
MEM_COPY_ATTRIBUTES (dstp, dest_mem);
emit_insn (gen_rtx_SET (VOIDmode, dstp, temp[phase]));
offset_st += amount[phase];
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 82ad6ed..215b812 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2286,7 +2286,6 @@ expand_block_move_mem (mode, addr, orig_mem)
{
rtx mem = gen_rtx_MEM (mode, addr);
- RTX_UNCHANGING_P (mem) = RTX_UNCHANGING_P (orig_mem);
MEM_COPY_ATTRIBUTES (mem, orig_mem);
#ifdef MEM_UNALIGNED_P
MEM_UNALIGNED_P (mem) = MEM_UNALIGNED_P (orig_mem);
diff --git a/gcc/cse.c b/gcc/cse.c
index fe5e4a6..4748570 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4176,7 +4176,6 @@ gen_lowpart_if_possible (mode, x)
new = gen_rtx_MEM (mode, plus_constant (XEXP (x, 0), offset));
if (! memory_address_p (mode, XEXP (new, 0)))
return 0;
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
return new;
}
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 7ac0e8c..82a2ca2 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1283,11 +1283,7 @@ operand_subword (op, i, validate_address, mode)
}
new = gen_rtx_MEM (word_mode, addr);
-
MEM_COPY_ATTRIBUTES (new, op);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (op);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (op);
-
return new;
}
@@ -1597,9 +1593,7 @@ change_address (memref, mode, addr)
return memref;
new = gen_rtx_MEM (mode, addr);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (memref);
MEM_COPY_ATTRIBUTES (new, memref);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (memref);
return new;
}
diff --git a/gcc/explow.c b/gcc/explow.c
index 0f067ca..4d3756e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -644,22 +644,18 @@ stabilize (x)
{
rtx temp = copy_all_regs (addr);
rtx mem;
+
if (GET_CODE (temp) != REG)
temp = copy_to_reg (temp);
mem = gen_rtx_MEM (GET_MODE (x), temp);
/* Mark returned memref with in_struct if it's in an array or
- structure. Copy const and volatile from original memref. */
+ structure. Copy everything else from original memref. */
- RTX_UNCHANGING_P (mem) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (mem, x);
if (GET_CODE (addr) == PLUS)
MEM_SET_IN_STRUCT_P (mem, 1);
- /* Since the new MEM is just like the old X, it can alias only
- the things that X could. */
- MEM_ALIAS_SET (mem) = MEM_ALIAS_SET (x);
-
return mem;
}
return x;
diff --git a/gcc/expr.c b/gcc/expr.c
index ce4ecc7..8de3905 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -402,9 +402,7 @@ protect_from_queue (x, modify)
register rtx y = XEXP (x, 0);
register rtx new = gen_rtx_MEM (GET_MODE (x), QUEUED_VAR (y));
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (x);
if (QUEUED_INSN (y))
{
@@ -2748,9 +2746,7 @@ emit_move_insn_1 (x, y)
{
rtx new = gen_rtx_MEM (GET_MODE (x), inner);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (x);
x = new;
}
if (reload_in_progress && GET_CODE (y) == MEM
@@ -2758,9 +2754,7 @@ emit_move_insn_1 (x, y)
{
rtx new = gen_rtx_MEM (GET_MODE (y), inner);
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (y);
MEM_COPY_ATTRIBUTES (new, y);
- MEM_ALIAS_SET (new) = MEM_ALIAS_SET (y);
y = new;
}
diff --git a/gcc/final.c b/gcc/final.c
index 28c6c0a..dc9334f 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -3110,12 +3110,12 @@ alter_subreg (x)
else if (GET_CODE (y) == MEM)
{
register int offset = SUBREG_WORD (x) * UNITS_PER_WORD;
+
if (BYTES_BIG_ENDIAN)
offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (y))));
PUT_CODE (x, MEM);
MEM_COPY_ATTRIBUTES (x, y);
- MEM_ALIAS_SET (x) = MEM_ALIAS_SET (y);
XEXP (x, 0) = plus_constant (XEXP (y, 0), offset);
}
diff --git a/gcc/function.c b/gcc/function.c
index 756f5fc..6815ab8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2046,7 +2046,6 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
newmem = gen_rtx_MEM (wanted_mode,
plus_constant (XEXP (tem, 0), offset));
- RTX_UNCHANGING_P (newmem) = RTX_UNCHANGING_P (tem);
MEM_COPY_ATTRIBUTES (newmem, tem);
/* Make the change and see if the insn remains valid. */
@@ -2238,7 +2237,6 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
newmem = gen_rtx_MEM (wanted_mode,
plus_constant (XEXP (tem, 0),
offset));
- RTX_UNCHANGING_P (newmem) = RTX_UNCHANGING_P (tem);
MEM_COPY_ATTRIBUTES (newmem, tem);
/* Make the change and see if the insn remains valid. */
@@ -2928,7 +2926,6 @@ purge_addressof_1 (loc, insn, force, store, ht)
{
sub2 = gen_rtx_MEM (GET_MODE (x), copy_rtx (XEXP (sub, 0)));
MEM_COPY_ATTRIBUTES (sub2, sub);
- RTX_UNCHANGING_P (sub2) = RTX_UNCHANGING_P (sub);
sub = sub2;
}
else if (GET_CODE (sub) == REG
diff --git a/gcc/integrate.c b/gcc/integrate.c
index d22dbfb..8e0f910 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2130,8 +2130,6 @@ copy_rtx_and_substitute (orig, map, for_lhs)
PUT_MODE (copy, mode);
XEXP (copy, 0) = copy_rtx_and_substitute (XEXP (orig, 0), map, 0);
MEM_COPY_ATTRIBUTES (copy, orig);
- MEM_ALIAS_SET (copy) = MEM_ALIAS_SET (orig);
- RTX_UNCHANGING_P (copy) = RTX_UNCHANGING_P (orig);
return copy;
default:
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 2004f6a..0cfe064 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3769,7 +3769,6 @@ gen_move_insn (x, y)
if (x == 0 && GET_CODE (x1) == MEM)
{
x = gen_rtx_MEM (tmode, XEXP (x1, 0));
- RTX_UNCHANGING_P (x) = RTX_UNCHANGING_P (x1);
MEM_COPY_ATTRIBUTES (x, x1);
copy_replacements (x1, x);
}
@@ -3778,7 +3777,6 @@ gen_move_insn (x, y)
if (y == 0 && GET_CODE (y1) == MEM)
{
y = gen_rtx_MEM (tmode, XEXP (y1, 0));
- RTX_UNCHANGING_P (y) = RTX_UNCHANGING_P (y1);
MEM_COPY_ATTRIBUTES (y, y1);
copy_replacements (y1, y);
}
diff --git a/gcc/recog.c b/gcc/recog.c
index c732dc2..ee38628 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -518,7 +518,6 @@ validate_replace_rtx_1 (loc, from, to, object)
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)));
new = gen_rtx_MEM (mode, plus_constant (XEXP (to, 0), offset));
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (to);
MEM_COPY_ATTRIBUTES (new, to);
validate_change (object, loc, new, 1);
return;
@@ -576,7 +575,6 @@ validate_replace_rtx_1 (loc, from, to, object)
newmem = gen_rtx_MEM (wanted_mode,
plus_constant (XEXP (to, 0), offset));
- RTX_UNCHANGING_P (newmem) = RTX_UNCHANGING_P (to);
MEM_COPY_ATTRIBUTES (newmem, to);
validate_change (object, &XEXP (x, 2), GEN_INT (pos), 1);
diff --git a/gcc/rtl.h b/gcc/rtl.h
index df3a8fb..3a873a5 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -760,12 +760,13 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
not refer to a scalar.*/
#define MEM_SCALAR_P(RTX) ((RTX)->frame_related)
-/* Copy the MEM_VOLATILE_P, MEM_IN_STRUCT_P, and MEM_SCALAR_P
- attributes from RHS to LHS. */
+/* Copy the attributes that apply to memory locations from RHS to LHS. */
#define MEM_COPY_ATTRIBUTES(LHS, RHS) \
(MEM_VOLATILE_P (LHS) = MEM_VOLATILE_P (RHS), \
MEM_IN_STRUCT_P (LHS) = MEM_IN_STRUCT_P (RHS), \
- MEM_SCALAR_P (LHS) = MEM_SCALAR_P (RHS))
+ MEM_SCALAR_P (LHS) = MEM_SCALAR_P (RHS), \
+ MEM_ALIAS_SET (LHS) = MEM_ALIAS_SET (RHS), \
+ RTX_UNCHANGING_P (LHS) = RTX_UNCHANGING_P (RHS))
/* If VAL is non-zero, set MEM_IN_STRUCT_P and clear MEM_SCALAR_P in
RTX. Otherwise, vice versa. Use this macro only when you are
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index e3508ef..84bba2d 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -2604,11 +2604,9 @@ add_mem_for_addr (addr_elt, mem_elt, x)
return;
new = gen_rtx_MEM (GET_MODE (x), addr_elt->u.val_rtx);
- addr_elt->addr_list = new_elt_list (addr_elt->addr_list, mem_elt);
-
- RTX_UNCHANGING_P (new) = RTX_UNCHANGING_P (x);
MEM_COPY_ATTRIBUTES (new, x);
+ addr_elt->addr_list = new_elt_list (addr_elt->addr_list, mem_elt);
mem_elt->locs = new_elt_loc_list (mem_elt->locs, new);
}
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 5bad3397..88538e0 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4228,7 +4228,6 @@ expand_anon_union_decl (decl, cleanup, decl_elts)
{
DECL_RTL (decl_elt) = gen_rtx_MEM (mode, copy_rtx (XEXP (x, 0)));
MEM_COPY_ATTRIBUTES (DECL_RTL (decl_elt), x);
- RTX_UNCHANGING_P (DECL_RTL (decl_elt)) = RTX_UNCHANGING_P (x);
}
}
else if (GET_CODE (x) == REG)