This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21520] missing PRE opportunity with cast after cast
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2005 22:04:15 -0000
- Subject: [Bug tree-optimization/21520] missing PRE opportunity with cast after cast
- References: <20050511210155.21520.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-11 22:04 -------
And we save an instruction on x86 (both with -O2 -fomit-frame-pointer)
before:
movl 4(%esp), %edx
movb $1, %al
testl %edx, %edx
je .L4
movzbl (%edx), %eax
.L4:
movsbl %al,%eax
ret
after:
movl 4(%esp), %edx
movl $1, %eax
testl %edx, %edx
je .L10
movsbl (%edx),%eax
.L10:
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21520