aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-07-08 16:33:15 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-07-08 16:33:15 -0700
commit5dbc84995425b0be71f35b477590dff30d5edba0 (patch)
treeb996b50fe93e605d92173f2a9824b5699c57ea23
parentc4a18992ac16c7468abe3b701979dc8d19f47a5d (diff)
downloadgcc-5dbc84995425b0be71f35b477590dff30d5edba0.zip
gcc-5dbc84995425b0be71f35b477590dff30d5edba0.tar.gz
gcc-5dbc84995425b0be71f35b477590dff30d5edba0.tar.bz2
(note_mem_written): Varying structure memory access with
AND address can alias scalars. From-SVN: r12417
-rw-r--r--gcc/cse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index e2baf7d..ba816d7 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7583,10 +7583,15 @@ note_mem_written (written, writes_ptr)
and that's just as good as a structure element
in implying that we need not invalidate scalar variables.
However, we must allow QImode aliasing of scalars, because the
- ANSI C standard allows character pointers to alias anything. */
+ ANSI C standard allows character pointers to alias anything.
+ We must also allow AND addresses, because they may generate
+ accesses outside the object being referenced. This is used to
+ generate aligned addresses from unaligned addresses, for instance,
+ the alpha storeqi_unaligned pattern. */
if (! ((MEM_IN_STRUCT_P (written)
|| GET_CODE (XEXP (written, 0)) == PLUS)
- && GET_MODE (written) != QImode))
+ && GET_MODE (written) != QImode
+ && GET_CODE (XEXP (written, 0)) != AND))
writes_ptr->all = 1;
writes_ptr->nonscalar = 1;
}