This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/11180] [avr-gcc] Optimization decrease performance of struct assignment.
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jul 2003 13:38:22 -0000
- Subject: [Bug optimization/11180] [avr-gcc] Optimization decrease performance of struct assignment.
- References: <20030613023559.11180.dmixm@marine.febras.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11180
------- Additional Comments From steven at gcc dot gnu dot org 2003-07-10 13:38 -------
On i686-pc-linux-gnu I get identical asm for -O2 and -O3 and also for -O1 and
-Os. The only difference between -O[23] and -O[1s] is:
< .p2align 2,,3
.file "11180.c"
.text
.p2align 2,,3
.globl foo
.type foo, @function
foo:
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $1, (%eax)
movl $2, 4(%eax)
leave
ret $4
.size foo, .-foo
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.4 20030710 (experimental)"
So -Os is optimal AFAICT (obviously it gets even smaller with -fomit-frame-pointer).
Apparently this is something target specific. What target is avr-gcc?
Gr.
Steven