This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimising redundant compares
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: jbeniston at compxs dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Sep 2003 11:25:27 +0100
- Subject: Re: Optimising redundant compares
- Organization: Codesourcery LLC
- References: <012001c38349$f4579e60$06bda8c0@Kindrogan>
Hi Jon,
Hi all,
I am working on a port of GCC to a machine that has a CC register that
is only modified by compare instructions. I have modeled this in GCC
using a single hard register rather than cc0. I would like to optimise
away redundant compare operations that are produced from the following
example:
IIRC powerpc has something like this. To gcc, the compare instruction
generates a set of bits indicating =, <, > etc, and the branch instructions
select particular patterns. Have you looked there?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk