summaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 19d938301bb..6bc48c8efe1 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1146,8 +1146,7 @@ canon_address (rtx mem,
HOST_WIDE_INT *offset,
cselib_val **base)
{
- enum machine_mode address_mode
- = targetm.addr_space.address_mode (MEM_ADDR_SPACE (mem));
+ enum machine_mode address_mode = get_address_mode (mem);
rtx mem_address = XEXP (mem, 0);
rtx expanded_address, address;
int expanded;
@@ -1561,7 +1560,7 @@ record_store (rtx body, bb_info_t bb_info)
mem_addr = group->canon_base_addr;
}
if (offset)
- mem_addr = plus_constant (mem_addr, offset);
+ mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
while (ptr)
@@ -2178,7 +2177,7 @@ check_mem_read_rtx (rtx *loc, void *data)
mem_addr = group->canon_base_addr;
}
if (offset)
- mem_addr = plus_constant (mem_addr, offset);
+ mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
/* We ignore the clobbers in store_info. The is mildly aggressive,