aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-07-10 11:25:32 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-07-10 07:25:32 -0400
commit62926f0b9cdcb60759994120091a28ab8e6f11ef (patch)
tree98a712ed3f14df1cdb79dc0689acf6125c20b847
parentacdcefccef4188c8d3946786d9348ae1c933ff7f (diff)
downloadgcc-62926f0b9cdcb60759994120091a28ab8e6f11ef.zip
gcc-62926f0b9cdcb60759994120091a28ab8e6f11ef.tar.gz
gcc-62926f0b9cdcb60759994120091a28ab8e6f11ef.tar.bz2
emit-rtl.c (adjust_address, [...]): Change criteria for whether can put offset inside LO_SUM to check mode alignment...
* emit-rtl.c (adjust_address, adjust_address_nv): Change criteria for whether can put offset inside LO_SUM to check mode alignment, not size. From-SVN: r43896
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/emit-rtl.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 101fbcf..840fd83 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jul 10 07:27:53 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * emit-rtl.c (adjust_address, adjust_address_nv): Change criteria for
+ whether can put offset inside LO_SUM to check mode alignment, not size.
+
2001-07-10 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* doc/tm.texi (Misc): Fix thinko.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 42137bf..eae04b6 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1631,10 +1631,11 @@ adjust_address (memref, mode, offset)
will do memref tracking. */
rtx addr = XEXP (memref, 0);
- /* If MEMREF is a LO_SUM and the offset is within the size of the
+ /* If MEMREF is a LO_SUM and the offset is within the alignment of the
object, we can merge it into the LO_SUM. */
if (GET_MODE (memref) != BLKmode && GET_CODE (addr) == LO_SUM
- && offset >= 0 && offset < GET_MODE_SIZE (GET_MODE (memref)))
+ && offset >= 0
+ && offset < GET_MODE_ALIGNMENT (GET_MODE (memref)) / BITS_PER_UNIT)
addr = gen_rtx_LO_SUM (mode, XEXP (addr, 0),
plus_constant (XEXP (addr, 1), offset));
else
@@ -1658,7 +1659,8 @@ adjust_address_nv (memref, mode, offset)
/* If MEMREF is a LO_SUM and the offset is within the size of the
object, we can merge it into the LO_SUM. */
if (GET_MODE (memref) != BLKmode && GET_CODE (addr) == LO_SUM
- && offset >= 0 && offset < GET_MODE_SIZE (GET_MODE (memref)))
+ && offset >= 0
+ && offset < GET_MODE_ALIGNMENT (GET_MODE (memref)) / BITS_PER_UNIT)
addr = gen_rtx_LO_SUM (mode, XEXP (addr, 0),
plus_constant (XEXP (addr, 1), offset));
else