http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57579
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Federico Carminati from comment #0) > Good evening, > all my apologises if this is a stupid question, however I have a terribly > simple loop > > > include <math.h> > > typedef struct > { > double x,y,z; > double dummy; > } P; > > > void foo(const P * __restrict__ points, double * __restrict__ d) > { > for(int i=0;i<100;++i) { > d[i]=points[i].x*points[i].x*points[i].x*points[i].x+ > points[i].y*points[i].y*points[i].y+ > points[i].z*points[i].z*points[i].z; > } > } > > if I compile with > > /opt/gcc-4.8.1/bin/g++ -c -std=c++0x -O3 -msse4.1 -Wall -Wstrict-aliasing=2 > -ftree-vectorizer-verbose=2 > > I obtain the diagnostic at the bottom of the page. Is there a place where I > can find an explanation for the g++ vectorizer diagnostic messages? I > frankly do not understand what it is talking about and google does not seem > to be willing to help me this time. Any help in deciphering these messages > would be greatly appreciated. Thanks and sorry for the bother > > Analyzing loop at testvec1.cxx:12 > > testvec1.cxx:12: note: Data access with gaps requires scalar epilogue loop > testvec1.cxx:12: note: vector alignment may not be reachable > testvec1.cxx:12: note: virtual phi. skip. > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: no array mode for V2DF[4] > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: no array mode for V2DF[4] > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: not ssa-name. > testvec1.cxx:12: note: use not simple. > testvec1.cxx:12: note: no array mode for V2DF[4] > > Vectorizing loop at testvec1.cxx:12 ^^^^ the loop is vectorized. > testvec1.cxx:12: note: virtual phi. skip. > testvec1.cxx:12: note: no array mode for V2DF[4] > testvec1.cxx:12: note: no array mode for V2DF[4] > testvec1.cxx:12: note: no array mode for V2DF[4] > testvec1.cxx:10: note: vectorized 1 loops in function. > > testvec1.cxx:10: note: not vectorized: not enough data-refs in basic block. > > testvec1.cxx:13: note: not vectorized: no vectype for stmt: vect_var_.10_29 > = MEM[(const struct P *)vect_ppoints.6_31]; > scalar_type: const vector(2) double > testvec1.cxx:13: note: Failed to SLP the basic block. > testvec1.cxx:13: note: not vectorized: failed to find SLP opportunities in > basic block. > > testvec1.cxx:13: note: Build SLP failed: grouped loads have gaps _59 = > _60->x; > > testvec1.cxx:13: note: Failed to SLP the basic block. > testvec1.cxx:13: note: not vectorized: failed to find SLP opportunities in > basic block. > > testvec1.cxx:10: note: not vectorized: not enough data-refs in basic block. the rest of the "complaints" are from basic-block vectorization trying to vectorize the loop body again. Which of course fails, it is already vectorized.