aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 3729233f..9ad98f0 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1862,7 +1862,8 @@ change_address (memref, mode, addr)
MEM_ATTRS (new)
= get_mem_attrs (MEM_ALIAS_SET (memref), 0, 0,
mmode == BLKmode ? 0 : GEN_INT (GET_MODE_SIZE (mmode)),
- mmode == BLKmode ? 1 : GET_MODE_ALIGNMENT (mmode),
+ (mmode == BLKmode ? BITS_PER_UNIT
+ : GET_MODE_ALIGNMENT (mmode)),
mmode);
return new;
@@ -1915,8 +1916,8 @@ adjust_address_1 (memref, mode, offset, validate, adjust)
memalign = MIN (memalign, (offset & -offset) * BITS_PER_UNIT);
/* We can compute the size in a number of ways. */
- if (mode != BLKmode)
- size = GEN_INT (GET_MODE_SIZE (mode));
+ if (GET_MODE (new) != BLKmode)
+ size = GEN_INT (GET_MODE_SIZE (GET_MODE (new)));
else if (MEM_SIZE (memref))
size = plus_constant (MEM_SIZE (memref), -offset);