This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49760] vectorization inhibited if indices are references
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Jul 2011 08:57:35 +0000
- Subject: [Bug tree-optimization/49760] vectorization inhibited if indices are references
- Auto-submitted: auto-generated
- References: <bug-49760-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49760
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |missed-optimization
Last reconfirmed| |2011.07.18 08:57:31
CC| |rguenth at gcc dot gnu.org
Ever Confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-18 08:57:31 UTC ---
The issue is that *k may be aliased by a store to the int array pointed to
by out. That is because the middle-end treats int & k the same as
int * k (not sure if there is a semantic difference in C++), so it might
as well point to out.a[27]. Which means int & k should be restrict
qualified as well (why even pass it as reference?)