diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-12 16:56:48 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-12 16:56:48 +0000 |
commit | dc2dfdb6b7111997a3dd80146b0256810a532b0b (patch) | |
tree | 1fa2e5dfd7a4057fe7848ae8d3cb6995e75158b1 | |
parent | f8556812de05b09c19210c4093d31cf15293e9b6 (diff) | |
download | gcc-dc2dfdb6b7111997a3dd80146b0256810a532b0b.tar.gz |
* alias.c (nonoverlapping_memrefs_p): Only update size from memref
if both size and offset known.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46956 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/alias.c | 11 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 017042e5945..9963c167fea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 12 11:58:26 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * alias.c (nonoverlapping_memrefs_p): Only update size from memref + if both size and offset known. + 2001-11-12 David O'Brien <obrien@FreeBSD.org> * config/ia64/freebsd.h: Fix misspelling. diff --git a/gcc/alias.c b/gcc/alias.c index 45e82643ad7..7f01c0c7396 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1817,16 +1817,19 @@ nonoverlapping_memrefs_p (x, y) : MEM_SIZE (rtly) ? INTVAL (MEM_SIZE (rtly)) : -1); - /* If we have an offset or size for either memref, it can update the values - computed above. */ + /* If we have an offset for either memref, it can update the values computed + above. */ if (MEM_OFFSET (x)) offsetx += INTVAL (MEM_OFFSET (x)), sizex -= INTVAL (MEM_OFFSET (x)); if (MEM_OFFSET (y)) offsety += INTVAL (MEM_OFFSET (y)), sizey -= INTVAL (MEM_OFFSET (y)); - if (MEM_SIZE (x)) + /* If a memref has both a size and an offset, we can use the smaller size. + We can't do this is the offset isn't know because we must view this + memref as being anywhere inside the DECL's MEM. */ + if (MEM_SIZE (x) && MEM_OFFSET (x)) sizex = INTVAL (MEM_SIZE (x)); - if (MEM_SIZE (y)) + if (MEM_SIZE (y) && MEM_OFFSET (y)) sizey = INTVAL (MEM_SIZE (y)); /* Put the values of the memref with the lower offset in X's values. */ |