This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/9566] Inline function produces much worse code than manual inlining.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2003 03:51:58 -0000
- Subject: [Bug optimization/9566] Inline function produces much worse code than manual inlining.
- References: <20030204102600.9566.osv@javad.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-01 03:51 -------
Here is valid (correctly initializing "a") code which shows the problem on the tree-ssa and on the
mainline:
struct A {
char const* src;
char* dest;
void copy() { *++dest = *++src; }
};
void g1(A *b) {
A a = *b;
for(int i = 0; i < 10; ++i)
a.copy();
}
void g2(A* b) {
A a = *b;
for(int i = 0; i < 10; ++i)
*++a.dest = *++a.src;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-11-04 14:43:47 |2003-12-01 03:51:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9566