[Bug tree-optimization/61247] New: vectorization fails if conversion from unsigned int to signed int is involved
vincenzo.innocente at cern dot ch
gcc-bugzilla@gcc.gnu.org
Tue May 20 07:40:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61247
Bug ID: 61247
Summary: vectorization fails if conversion from unsigned int to
signed int is involved
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vincenzo.innocente at cern dot ch
in the following example
cat uintLoop.cc
unsigned int N;
float * a, *b, *c;
using Ind = /*unsigned*/ int;
inline
float & val(float * x, Ind i) { return x[i];}
inline
float const & val(float const * x, Ind i) { return x[i];}
void foo() {
#pragma GCC ivdep
for (auto i=0U; i<N; ++i)
val(a,i) = val(b,i)*val(c,i);
}
using Ind = /*unsigned*/ int;
does not vectorize with
c++ -std=c++1y -Ofast -Wall -fopt-info-vec-missed -fno-tree-slp-vectorize
-march=nehalem -S uintLoop.cc
uintLoop.cc:12:17: note: not vectorized: not suitable for gather load _8 =
*_17;
uintLoop.cc:12:17: note: bad data references.
using Ind = unsigned int;
vectorize fine
minor, just annoying
More information about the Gcc-bugs
mailing list