This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/64557] get_addr in true_dependence_1 cannot handle VALUE inside an expr
- From: "wmi at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 10 Jan 2015 21:47:43 +0000
- Subject: [Bug rtl-optimization/64557] get_addr in true_dependence_1 cannot handle VALUE inside an expr
- Auto-submitted: auto-generated
- References: <bug-64557-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64557
--- Comment #1 from wmi at google dot com ---
The experimental patch is to call get_addr for VALUE of base before plus other
constant, when creating mem_addr for dependence check and for store_info.
bootstrap and regression on x86_64-linux-gnu are ok.
Index: dse.c
===================================================================
--- dse.c (revision 219421)
+++ dse.c (working copy)
@@ -1564,6 +1564,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);
}
@@ -2177,6 +2178,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);
}