This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/23322] [4.1/4.2/4.3 regression] performance regression, possibly related to caching
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2007 14:24:26 -0000
- Subject: [Bug target/23322] [4.1/4.2/4.3 regression] performance regression, possibly related to caching
- References: <bug-23322-10914@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from ubizjak at gmail dot com 2007-12-13 14:24 -------
c testcase:
--cut here--
extern void foo(void);
extern double *dpb;
double s000005m_test(void)
{
double result = 0.0;
int n;
for (n = 0; n < 2000; ++n)
result += dpb[n];
#ifdef FOOBAR
foo();
#endif
return result;
}
--cut here--
This also shows problems on x86_64, so probably not target dependant:
.LCFI0:
movq dpb(%rip), %rdx
xorl %eax, %eax
movsd %xmm0, (%rsp)
.align 16
.L2:
movsd (%rsp), %xmm0
addsd (%rdx,%rax,8), %xmm0
addq $1, %rax
cmpq $2000, %rax
movsd %xmm0, (%rsp)
jne .L2
call foo
movsd (%rsp), %xmm0
addq $8, %rsp
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23322