This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31363] long long optimization problem
- From: "gr at collax dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2007 18:03:19 -0000
- Subject: [Bug target/31363] long long optimization problem
- References: <bug-31363-14314@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from gr at collax dot com 2007-03-26 19:03 -------
(In reply to comment #1)
> Works for me.
Hm. Just to be completely sure, my source archive gcc-4.0.4.tar.bz2 has md5sum
8970debbc55bea85ee80961d733080f0, as two other copies fetched from different
mirrors. I compiled it on two different i386 Linux distributions, getting the
same result in both cases.
The generated assembler code in question is
foo:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
movl 8(%ebp), %eax
movl 12(%ebp), %edx
andl $-2147483648, %eax
movl %edx, %ecx
orl %eax, %ecx
je .L4
movl $.LC0, (%esp)
call puts
.L4:
leave
ret
If I understand this correctly, the upper half of the long long, in %edx,
remains unaltered but is ORed into the value that is finally tested.
What conditions could have lead to different results here?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31363