Optimising redundant compares
Nathan Sidwell
nathan@codesourcery.com
Thu Sep 25 17:34:00 GMT 2003
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
More information about the Gcc
mailing list