From ff1803c128986d7095c723a84e7c18ce33b2111e Mon Sep 17 00:00:00 2001 From: Wei Mi Date: Thu, 22 Jan 2015 17:59:23 +0000 Subject: [PATCH] re PR rtl-optimization/64557 (get_addr in true_dependence_1 cannot handle VALUE inside an expr) 2015-01-22 Wei Mi PR rtl-optimization/64557 * dse.c (record_store): Call get_addr for mem_addr. (check_mem_read_rtx): Likewise. From-SVN: r220010 --- gcc/ChangeLog | 6 ++++++ gcc/dse.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90b3987c457..3b8950194d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-22 Wei Mi + + PR rtl-optimization/64557 + * dse.c (record_store): Call get_addr for mem_addr. + (check_mem_read_rtx): Likewise. + 2015-01-22 Eric Botcazou * fold-const.c (const_binop): Add early return for non-tcc_binary. diff --git a/gcc/dse.c b/gcc/dse.c index ea6f24585c5..2bb20d74625 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1575,6 +1575,10 @@ record_store (rtx body, bb_info_t bb_info) = rtx_group_vec[group_id]; mem_addr = group->canon_base_addr; } + /* get_addr can only handle VALUE but cannot handle expr like: + VALUE + OFFSET, so call get_addr to get original addr for + mem_addr before plus_constant. */ + mem_addr = get_addr (mem_addr); if (offset) mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset); } @@ -2188,6 +2192,10 @@ check_mem_read_rtx (rtx *loc, bb_info_t bb_info) = rtx_group_vec[group_id]; mem_addr = group->canon_base_addr; } + /* get_addr can only handle VALUE but cannot handle expr like: + VALUE + OFFSET, so call get_addr to get original addr for + mem_addr before plus_constant. */ + mem_addr = get_addr (mem_addr); if (offset) mem_addr = plus_constant (get_address_mode (mem), mem_addr, offset); } -- 2.30.2