This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54589] struct offset add should be folded into address calculation
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Sep 2012 08:49:25 +0000
- Subject: [Bug target/54589] struct offset add should be folded into address calculation
- Auto-submitted: auto-generated
- References: <bug-54589-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54589
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*, i?86-*-*
Status|UNCONFIRMED |NEW
Keywords| |missed-optimization
Last reconfirmed| |2012-09-17
Component|tree-optimization |target
Ever Confirmed|0 |1
Summary|[missed-optimization] |struct offset add should be
|struct offset add should be |folded into address
|folded into address |calculation
|calculation |
Known to fail| |4.6.3, 4.7.2, 4.8.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-17 08:49:25 UTC ---
As there is no loop involved it is RTL fwprop or combines job to eventually
do this. I see
func:
.LFB517:
.cfi_startproc
movzbl (%rsi), %eax
addq $1, %rax
salq $4, %rax
movl (%rdi,%rax), %eax
movl %eax, (%rdx)
ret
for both 4.7 and 4.8. i?86 is even worse.