public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57579] New: Problem with vectorization
@ 2013-06-10 18:26 federico.carminati at cern dot ch
  2013-06-10 19:35 ` [Bug tree-optimization/57579] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: federico.carminati at cern dot ch @ 2013-06-10 18:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57579

            Bug ID: 57579
           Summary: Problem with vectorization
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: federico.carminati at cern dot ch

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

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-11  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-10 18:26 [Bug c++/57579] New: Problem with vectorization federico.carminati at cern dot ch
2013-06-10 19:35 ` [Bug tree-optimization/57579] " paolo.carlini at oracle dot com
2013-06-11  8:49 ` rguenth at gcc dot gnu.org
2013-06-11  8:59 ` federico.carminati at cern dot ch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).