This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14341] Missed comparison optimization (jump threading related)
- 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: 31 Jan 2005 15:33:11 -0000
- Subject: [Bug tree-optimization/14341] Missed comparison optimization (jump threading related)
- References: <20040229062941.14341.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-01-31 15:33 -------
<L0>:;
f (i <= 99999999);
D.1141 = (unsigned int) i + 1;
i = (int) D.1141;
if (D.1141 != 100000000) goto <L0>; else goto <L2>;
But note on x86 I get the same and the extra compare:
.L2:
xorl %eax, %eax
cmpl $99999999, %ebx <--- here
setle %al
movl %eax, (%esp)
call f
leal 1(%ebx), %eax
cmpl $100000000, %eax
movl %eax, %ebx
jne .L2
I have no idea what is going wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14341