This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49849] loop optimization prevents vectorization
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Jul 2011 08:30:51 +0000
- Subject: [Bug tree-optimization/49849] loop optimization prevents vectorization
- Auto-submitted: auto-generated
- References: <bug-49849-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49849
--- Comment #1 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-07-26 08:30:45 UTC ---
it may be a duplicate of my own PR49730
as
void bar2(int jj) {
const int S=8;
float x[S];
float y[S];
int j = jj*S;
for (int i=0; i!=S; ++i)
x[i] = co[k[j+i]];
for (int i=0; i!=S; ++i) // this should vectorize
y[i] = a[j+i]/std::sqrt(x[i]*b[j+i]);
for (int i=0; i!=S; ++i)
++hist[int(y[i])];
}
vectorize at 03
(of course in the example I submitted previously the external loop should read
for (int jj=0; jj!=loops; ++jj) {
int j = jj*S;
)