This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Optimising redundant compares


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]