diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b7ec138..c4afdb0 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 273a580..abd5f70 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; |