This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/3995] i386 optimisation: joining tests
- From: "debian-gcc at lists dot debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2003 15:32:49 -0000
- Subject: [Bug optimization/3995] i386 optimisation: joining tests
- References: <20010811004600.3995.105309-quiet@bugs.debian.org>
- 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=3995
debian-gcc at lists dot debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |herbert at gondor dot apana
| |dot org dot au
------- Additional Comments From debian-gcc at lists dot debian dot org 2003-08-10 15:32 -------
Herbert Xu writes:
This bug is mostly fixed, but one small detail remains. The final
jump back to the leave+ret sequence is still there.
Since leave+ret is a two-byte sequence, it makes sense to replace the
jump with a leave+ret.
Here is the -S -O2 output with gcc 3.3:
foo:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
cmpb $0, 8(%ebp)
jle .L2
call a
.L3:
leave
ret
.p2align 2,,3
.L2:
call b
jmp .L3
The last jmp should become
leave
ret
--