This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28690] [4.2/4.3 Regression] Performace problem with indexed load/stores on powerpc
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2006 07:56:40 -0000
- Subject: [Bug middle-end/28690] [4.2/4.3 Regression] Performace problem with indexed load/stores on powerpc
- References: <bug-28690-5233@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #27 from bonzini at gnu dot org 2006-11-29 07:56 -------
This case is still not fixed:
struct s {
int size;
float *data;
};
void f(struct s *d, struct s *s)
{
int i;
for (i = 0; i < s->size; i++)
d->data[i] += s->data[i];
}
The body of the loop is compiled to:
L4:
slwi r2,r9,2
addi r9,r9,1
lfsx f0,r2,r3
lfsx f13,r4,r2
fadds f0,f0,f13
stfsx f0,r2,r3
bdnz L4
Note how r2 is twice in the first position, and once in the second.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28690