diff options
author | Richard Biener <rguenther@suse.de> | 2016-04-04 09:30:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-04-04 09:30:16 +0000 |
commit | 43b9f499103ccebb9ce00e7c62e11da54334e63a (patch) | |
tree | 6684fdba1e474d2726d62599732082794132c876 /gcc/dse.c | |
parent | ed2a53e7ca7aafa5fea5316c7fdebdc77fb8f327 (diff) | |
download | gcc-43b9f499103ccebb9ce00e7c62e11da54334e63a.zip gcc-43b9f499103ccebb9ce00e7c62e11da54334e63a.tar.gz gcc-43b9f499103ccebb9ce00e7c62e11da54334e63a.tar.bz2 |
re PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char)
2016-04-04 Richard Biener <rguenther@suse.de>
PR rtl-optimization/70484
* rtl.h (canon_output_dependence): Declare.
* alias.c (canon_output_dependence): New function.
* dse.c (record_store): Use canon_output_dependence rather
than canon_true_dependence.
* gcc.dg/torture/pr70484.c: New testcase.
From-SVN: r234709
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1609,10 +1609,9 @@ record_store (rtx body, bb_info_t bb_info) the value of store_info. If it is, set the rhs to NULL to keep it from being used to remove a load. */ { - if (canon_true_dependence (s_info->mem, - GET_MODE (s_info->mem), - s_info->mem_addr, - mem, mem_addr)) + if (canon_output_dependence (s_info->mem, true, + mem, GET_MODE (mem), + mem_addr)) { s_info->rhs = NULL; s_info->const_rhs = NULL; |