public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte @ 2013-12-27 16:55 gcc-bugzilla at contacts dot eelis.net 2013-12-27 16:57 ` [Bug libstdc++/59611] " gcc-bugzilla at contacts dot eelis.net ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: gcc-bugzilla at contacts dot eelis.net @ 2013-12-27 16:55 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Bug ID: 59611 Summary: std::copy performs worse than naive implementation when copying a single known byte Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugzilla at contacts dot eelis.net Created attachment 31524 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31524&action=edit Testcase The attached testcase shows how using a naive implementation (mycopy) causes gcc to generate better code than using std::copy. (Clang /does/ generate optimal code when using std::copy in this case.) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net @ 2013-12-27 16:57 ` gcc-bugzilla at contacts dot eelis.net 2013-12-27 22:29 ` [Bug tree-optimization/59611] " glisse at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: gcc-bugzilla at contacts dot eelis.net @ 2013-12-27 16:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 --- Comment #1 from Eelis <gcc-bugzilla at contacts dot eelis.net> --- (With -O3) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net 2013-12-27 16:57 ` [Bug libstdc++/59611] " gcc-bugzilla at contacts dot eelis.net @ 2013-12-27 22:29 ` glisse at gcc dot gnu.org 2014-06-26 14:49 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: glisse at gcc dot gnu.org @ 2013-12-27 22:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Marc Glisse <glisse at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2013-12-27 Component|libstdc++ |tree-optimization Ever confirmed|0 |1 --- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- The call to memcpy is folded rather early to: MEM[(char * {ref-all})p_2(D)] = MEM[(char * {ref-all})&a]; and then we don't touch it anymore, maybe because we don't go through an SSA_NAME. We thus miss that the RHS is a constant. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net 2013-12-27 16:57 ` [Bug libstdc++/59611] " gcc-bugzilla at contacts dot eelis.net 2013-12-27 22:29 ` [Bug tree-optimization/59611] " glisse at gcc dot gnu.org @ 2014-06-26 14:49 ` rguenth at gcc dot gnu.org 2014-06-27 10:40 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2014-06-26 14:49 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Mine. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net ` (2 preceding siblings ...) 2014-06-26 14:49 ` rguenth at gcc dot gnu.org @ 2014-06-27 10:40 ` rguenth at gcc dot gnu.org 2014-07-11 13:44 ` rguenth at gcc dot gnu.org 2014-07-14 11:50 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2014-06-27 10:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |61473 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed by the patch for PR61473. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net ` (3 preceding siblings ...) 2014-06-27 10:40 ` rguenth at gcc dot gnu.org @ 2014-07-11 13:44 ` rguenth at gcc dot gnu.org 2014-07-14 11:50 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2014-07-11 13:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Bug 59611 depends on bug 61473, which changed state. Bug 61473 Summary: register sized memmove not inlined https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61473 What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/59611] std::copy performs worse than naive implementation when copying a single known byte 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net ` (4 preceding siblings ...) 2014-07-11 13:44 ` rguenth at gcc dot gnu.org @ 2014-07-14 11:50 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2014-07-14 11:50 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Verified that the 61473 fix fixed this as well. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-14 11:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-12-27 16:55 [Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte gcc-bugzilla at contacts dot eelis.net 2013-12-27 16:57 ` [Bug libstdc++/59611] " gcc-bugzilla at contacts dot eelis.net 2013-12-27 22:29 ` [Bug tree-optimization/59611] " glisse at gcc dot gnu.org 2014-06-26 14:49 ` rguenth at gcc dot gnu.org 2014-06-27 10:40 ` rguenth at gcc dot gnu.org 2014-07-11 13:44 ` rguenth at gcc dot gnu.org 2014-07-14 11:50 ` rguenth at gcc dot gnu.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).