public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/18439] New: vectorizer failed for vector normalization @ 2004-11-12 1:33 giovannibajo at libero dot it 2004-11-12 2:43 ` [Bug tree-optimization/18439] " pinskia at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: giovannibajo at libero dot it @ 2004-11-12 1:33 UTC (permalink / raw) To: gcc-bugs Vectorizer fails to handle this: ----------------------------------------------------- extern "C" double sqrt(double); #define NUMPOINTS 50000 static float points[NUMPOINTS][4]; static float opoints[NUMPOINTS][4]; static bool flags[NUMPOINTS]; void NormalizeVectors (void) { int i, r; float s, x, y, z; static float d = 0.0; d += 0.2; if (d > 4) d = 0.0; for (r=0; r<4; r++) { for (i=0; i<NUMPOINTS; i++) { x = points[i][0]; y = points[i][1]; z = points[i][2]; s = x * x + y * y + z * z; s = d / sqrt (s); opoints[i][0] = x * s; opoints[i][1] = y * s; opoints[i][2] = z * s; flags[i] = true; } } } ----------------------------------------------------- loop at bench.cc:79: not vectorized: unhandled data ref: d.0_36 = d loop at bench.cc:79: bad data references. This is a bit more complex than the other two I posted, I guess. Anyway, the first problem seems related to the static variable. -- Summary: vectorizer failed for vector normalization Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giovannibajo at libero dot it CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18439 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/18439] vectorizer failed for vector normalization 2004-11-12 1:33 [Bug tree-optimization/18439] New: vectorizer failed for vector normalization giovannibajo at libero dot it @ 2004-11-12 2:43 ` pinskia at gcc dot gnu dot org 2005-02-11 19:24 ` pinskia at gcc dot gnu dot org 2005-02-11 19:34 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-11-12 2:43 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-12 02:43 ------- Confirmed, ICC can do this but does not because it is not very inefficient to do it. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2004-11-12 02:43:29 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18439 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/18439] vectorizer failed for vector normalization 2004-11-12 1:33 [Bug tree-optimization/18439] New: vectorizer failed for vector normalization giovannibajo at libero dot it 2004-11-12 2:43 ` [Bug tree-optimization/18439] " pinskia at gcc dot gnu dot org @ 2005-02-11 19:24 ` pinskia at gcc dot gnu dot org 2005-02-11 19:34 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:24 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-11 14:19 ------- Really there are two problems which cause the missed vectorizor. One is that we don't scalarize the static variables that well. So that is the bug which really needs to be fixed first and really is not related to the vectorizor at all. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Last reconfirmed|2004-11-12 02:43:29 |2005-02-11 14:19:47 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18439 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/18439] vectorizer failed for vector normalization 2004-11-12 1:33 [Bug tree-optimization/18439] New: vectorizer failed for vector normalization giovannibajo at libero dot it 2004-11-12 2:43 ` [Bug tree-optimization/18439] " pinskia at gcc dot gnu dot org 2005-02-11 19:24 ` pinskia at gcc dot gnu dot org @ 2005-02-11 19:34 ` pinskia at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:34 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-11 14:47 ------- I filed PR 19905 for the missed optimization not really related (but blocking) the tree vectorizor. -- What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |19905 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18439 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-11 14:48 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-11-12 1:33 [Bug tree-optimization/18439] New: vectorizer failed for vector normalization giovannibajo at libero dot it 2004-11-12 2:43 ` [Bug tree-optimization/18439] " pinskia at gcc dot gnu dot org 2005-02-11 19:24 ` pinskia at gcc dot gnu dot org 2005-02-11 19:34 ` pinskia at gcc dot gnu dot org
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).