public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/wschmidt/heads/pu-upstream)] fix regression with MEM commoning
@ 2020-05-03 17:20 William Schmidt
0 siblings, 0 replies; only message in thread
From: William Schmidt @ 2020-05-03 17:20 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:df30ab70690d6088f367e74757f0b5dd6a2587e5
commit df30ab70690d6088f367e74757f0b5dd6a2587e5
Author: Richard Biener <rguenther@suse.de>
Date: Tue Apr 28 14:36:54 2020 +0200
fix regression with MEM commoning
This fixes a regression when canonicalizing refs for LIM PR84362.
This possibly unshares and rewrites the refs in the internal data
and thus pointer equality no longer works in ref_always_accessed
computation.
2020-04-29 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-im.c (ref_always_accessed::operator ()):
Just check whether the stmt stores.
Diff:
---
gcc/ChangeLog | 5 +++++
gcc/tree-ssa-loop-im.c | 9 +++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b7ec1386740..c4afdb053f7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-29 Richard Biener <rguenther@suse.de>
+
+ * tree-ssa-loop-im.c (ref_always_accessed::operator ()):
+ Just check whether the stmt stores.
+
2020-04-28 Alexandre Oliva <oliva@adacore.com>
PR target/94812
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 273a58038bd..abd5f702b91 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -2179,20 +2179,21 @@ ref_always_accessed::operator () (mem_ref_loc *loc)
{
class loop *must_exec;
- if (!get_lim_data (loc->stmt))
+ struct lim_aux_data *lim_data = get_lim_data (loc->stmt);
+ if (!lim_data)
return false;
/* If we require an always executed store make sure the statement
- stores to the reference. */
+ is a store. */
if (stored_p)
{
tree lhs = gimple_get_lhs (loc->stmt);
if (!lhs
- || lhs != *loc->ref)
+ || !(DECL_P (lhs) || REFERENCE_CLASS_P (lhs)))
return false;
}
- must_exec = get_lim_data (loc->stmt)->always_executed_in;
+ must_exec = lim_data->always_executed_in;
if (!must_exec)
return false;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-03 17:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 17:20 [gcc(refs/users/wschmidt/heads/pu-upstream)] fix regression with MEM commoning William Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).