This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34027] [4.3 regression] -Os code size nearly doubled
- 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: 12 Nov 2007 13:28:27 -0000
- Subject: [Bug tree-optimization/34027] [4.3 regression] -Os code size nearly doubled
- References: <bug-34027-9876@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-11-12 13:28 -------
We now generate with -Os -m32
foobar:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
pushl $0
pushl $1000000000
pushl 12(%ebp)
pushl 8(%ebp)
call __umoddi3
addl $16, %esp
leave
ret
and with -O2 -m32:
foobar:
pushl %ebp
movl %esp, %ebp
subl $24, %esp
movl 12(%ebp), %edx
movl 8(%ebp), %eax
cmpl $0, %edx
ja .L5
cmpl $999999999, %eax
ja .L5
leave
ret
which for -Os is smaller than what we generated with 4.2 (and for -O2 it
is slightly larger).
So, fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34027