[PATCH PR64557] get_addr in true_dependence_1 cannot handle VALUE inside an expr
Wei Mi
wmi@google.com
Wed Jan 21 23:33:00 GMT 2015
Hi,
The patch is to address the bug here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64557
It is to call get_addr for VALUE before forming a mem_addr expr with
the VALUE and an offset. This is to avoid the problem that get_addr
can only handle VALUE but cannot handle an expr like: (VALUE +
offset). With the fix, find_base_term can always get the base of the
original addr.
bootstrap and regression test on x86_64-linux-gnu are ok. regression
tests on aarch64-linux-gnu and powerpc64-linux-gnu are also ok. Is it
ok for trunk?
Thanks,
Wei.
gcc/ChangeLog:
2015-01-21 Wei Mi <wmi@google.com>
* dse.c (record_store): Call get_addr for mem_addr.
(check_mem_read_rtx): Likewise.
Index: gcc/dse.c
===================================================================
--- gcc/dse.c (revision 219975)
+++ gcc/dse.c (working copy)
@@ -1575,6 +1575,7 @@ record_store (rtx body, bb_info_t bb_inf
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
+ mem_addr = get_addr (mem_addr);
if (offset)
mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
@@ -2188,6 +2189,7 @@ check_mem_read_rtx (rtx *loc, bb_info_t
= rtx_group_vec[group_id];
mem_addr = group->canon_base_addr;
}
+ mem_addr = get_addr (mem_addr);
if (offset)
mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset);
}
More information about the Gcc-patches
mailing list