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/alias.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/alias.c')
-rw-r--r-- | gcc/alias.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 753e1af..a0e25dc 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -3057,6 +3057,20 @@ output_dependence (const_rtx mem, const_rtx x) /*mem_canonicalized=*/false, /*x_canonicalized*/false, /*writep=*/true); } + +/* Likewise, but we already have a canonicalized MEM, and X_ADDR for X. + Also, consider X in X_MODE (which might be from an enclosing + STRICT_LOW_PART / ZERO_EXTRACT). + If MEM_CANONICALIZED is true, MEM is canonicalized. */ + +int +canon_output_dependence (const_rtx mem, bool mem_canonicalized, + const_rtx x, machine_mode x_mode, rtx x_addr) +{ + return write_dependence_p (mem, x, x_mode, x_addr, + mem_canonicalized, /*x_canonicalized=*/true, + /*writep=*/true); +} |