This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32698] [4.3 regression] inefficient pointer expression
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2007 13:41:36 -0000
- Subject: [Bug tree-optimization/32698] [4.3 regression] inefficient pointer expression
- References: <bug-32698-14001@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-07-09 13:41 -------
Created an attachment (id=13875)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13875&action=view)
patch
With the proposed patch mainline generates again
foo:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %ecx
movl 12(%ebp), %edx
popl %ebp
movl 8(%ecx,%edx,4), %eax
addl 4(%ecx,%edx,4), %eax
addl 12(%ecx,%edx,4), %eax
ret
and
return (*(p + (i + 2) * 4) + *(p + (i + 1) * 4)) + *(p + (i + 3) * 4);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32698