re PR rtl-optimization/64557 (get_addr in true_dependence_1 cannot handle VALUE inside an expr)

2015-01-22  Wei Mi  <wmi@google.com>

        PR rtl-optimization/64557
        * dse.c (record_store): Call get_addr for mem_addr.
        (check_mem_read_rtx): Likewise.

From-SVN: r220010
This commit is contained in:
Wei Mi 2015-01-22 17:59:23 +00:00 committed by Wei Mi
parent 6e43628633
commit ff1803c128
2 changed files with 14 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2015-01-22 Wei Mi <wmi@google.com>
PR rtl-optimization/64557
* dse.c (record_store): Call get_addr for mem_addr.
(check_mem_read_rtx): Likewise.
2015-01-22 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (const_binop): Add early return for non-tcc_binary.

View file

@ -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);
}