re PR tree-optimization/84362 (Auto-vectorization regression when accessing member...
authorRichard Biener <rguenther@suse.de>
Thu, 20 Dec 2018 11:39:59 +0000 (11:39 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 20 Dec 2018 11:39:59 +0000 (11:39 +0000)
commit1c852d1d7096a8833b4e8dc0755a749314c2113a
treea7ab4ddd34dbf6dc0e3bc3b434f9a5b493b35cc9
parentf0355446cb66c85c5d4790c63bc53c3093186e8a
re PR tree-optimization/84362 (Auto-vectorization regression when accessing member variable through getter/accessor)

2018-12-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84362
* tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
(struct im_mem_ref): add ref_canonical flag.
(struct mem_ref_hasher): Use ao_ref as compare_type.
(mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
parts.
(mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
member.
(gather_mem_refs_stmt): Set up ao_ref early and do the lookup
using it.  If we have non-equal refs canonicalize the one
in the hashtable used for insertion.
(tree_ssa_lim_initialize): Adjust.

* g++.dg/vect/pr84362.cc: New testcase.

From-SVN: r267296
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/vect/pr84362.cc [new file with mode: 0644]
gcc/tree-ssa-loop-im.c