public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/38012] New: vectorizer ignores 'restrict' @ 2008-11-04 16:06 David dot Monniaux at imag dot fr 2008-11-04 16:07 ` [Bug c++/38012] " David dot Monniaux at imag dot fr ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: David dot Monniaux at imag dot fr @ 2008-11-04 16:06 UTC (permalink / raw) To: gcc-bugs The vectorizer ignores the 'restrict' keyword regarding two pointer destinations, and emits a run-time aliasing text. -- Summary: vectorizer ignores 'restrict' Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: David dot Monniaux at imag dot fr GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38012 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/38012] vectorizer ignores 'restrict' 2008-11-04 16:06 [Bug c++/38012] New: vectorizer ignores 'restrict' David dot Monniaux at imag dot fr @ 2008-11-04 16:07 ` David dot Monniaux at imag dot fr 2008-11-04 16:11 ` [Bug middle-end/38012] " rguenth at gcc dot gnu dot org 2009-06-25 11:20 ` rguenth at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: David dot Monniaux at imag dot fr @ 2008-11-04 16:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from David dot Monniaux at imag dot fr 2008-11-04 16:06 ------- Created an attachment (id=16623) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16623&action=view) source code where va and vb are thought to be aliased The compiler should heed that va and vb cannot point to aliased locations. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38012 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/38012] vectorizer ignores 'restrict' 2008-11-04 16:06 [Bug c++/38012] New: vectorizer ignores 'restrict' David dot Monniaux at imag dot fr 2008-11-04 16:07 ` [Bug c++/38012] " David dot Monniaux at imag dot fr @ 2008-11-04 16:11 ` rguenth at gcc dot gnu dot org 2009-06-25 11:20 ` rguenth at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu dot org @ 2008-11-04 16:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from rguenth at gcc dot gnu dot org 2008-11-04 16:10 ------- restrict support is only roughly implemented. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|minor |enhancement Component|c++ |middle-end Keywords| |alias, missed-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38012 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/38012] vectorizer ignores 'restrict' 2008-11-04 16:06 [Bug c++/38012] New: vectorizer ignores 'restrict' David dot Monniaux at imag dot fr 2008-11-04 16:07 ` [Bug c++/38012] " David dot Monniaux at imag dot fr 2008-11-04 16:11 ` [Bug middle-end/38012] " rguenth at gcc dot gnu dot org @ 2009-06-25 11:20 ` rguenth at gcc dot gnu dot org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu dot org @ 2009-06-25 11:20 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rguenth at gcc dot gnu dot org 2009-06-25 11:19 ------- double* __restrict__ va; const double* __restrict__ vb; for(unsigned i=0; i<a.size(); i++) { va = &a[i]; vb = &b[i]; (*va) = (*vb) *coef; } this only says that a[i] and b[i] do not alias in one loop iteration, it doesn't cover cross-iteration dependencies that the vectorizer needs. double* __restrict__ va = a; const double* __restrict__ vb = b; for(unsigned i=0; i<a.size(); i++) { va[i] = vb[i] *coef; } will work. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38012 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-25 11:20 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-11-04 16:06 [Bug c++/38012] New: vectorizer ignores 'restrict' David dot Monniaux at imag dot fr 2008-11-04 16:07 ` [Bug c++/38012] " David dot Monniaux at imag dot fr 2008-11-04 16:11 ` [Bug middle-end/38012] " rguenth at gcc dot gnu dot org 2009-06-25 11:20 ` rguenth 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).