This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12508] weak optimization for some constants < 2^16
- 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: 24 Dec 2003 22:03:52 -0000
- Subject: [Bug optimization/12508] weak optimization for some constants < 2^16
- References: <20031004182021.12508.gpiez@users.sourceforge.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-24 22:03 -------
With the mainline with -march=i686, I get (which is not optimial):
movl 4(%esp), %eax
andl $-16, %eax
testw %ax, %ax
setne %al
movzbl %al, %eax
ret
But with -march=i386, I get:
xorl %eax, %eax
testl $65520, 4(%esp)
setne %al
ret
So it looks like the cost function gets causes this, somehow, again most likely the combine should
be doing more.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12508