This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/24418] Redudant compare to zero not eliminated
- From: "evancheng at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2005 22:55:21 -0000
- Subject: [Bug target/24418] Redudant compare to zero not eliminated
- References: <bug-24418-11457@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from evancheng at gcc dot gnu dot org 2005-10-25 22:55 -------
Closing this. It's not a bug. It's not safe to eliminate the cmpl. Its result
are read by je and jg:
je reads ZF, jg reads ZF and OF. Now consider
subl 0x80000000 0x1 (OF <- 1)
cmpl 0x7fffffff (OF <- 0)
--
evancheng at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24418