From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3038 invoked by alias); 10 Jun 2013 18:26:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3001 invoked by uid 48); 10 Jun 2013 18:26:21 -0000 From: "federico.carminati at cern dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57579] New: Problem with vectorization Date: Mon, 10 Jun 2013 18:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: federico.carminati at cern dot ch X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00505.txt.bz2 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 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.