This is the mail archive of the
mailing list for the GCC project.
Re: Use-and-clobber insns and some ancient combine.c code
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, gcc at gcc dot gnu dot org
- Date: Thu, 17 Jun 2004 15:39:53 +0100
- Subject: Re: Use-and-clobber insns and some ancient combine.c code
- Organization: GNU
- References: <200406171316.PAA05678@faui1m.informatik.uni-erlangen.de>
On Thu, 2004-06-17 at 14:16, Ulrich Weigand wrote:
> Hello Richard and Richard,
> when evaluating the use of ADD LOGICAL WITH CARRY instructions on s390
> (see also the patch I checked in today), I've noticed two places in
> combine that prevent those instructions to be exploited fully.
> Both of these are due to code you added to combine a long time ago;
> I was wondering if you still recall why these changes were necessary
> -- I don't really understand it in the context of the current code.
> In both cases, the issues arise from instructions that both use and
> clobber a hard register within a single PARALLEL. This happens
> naturally with an 'add with carry' type instruction: it uses the
> condition code (which is a hard reg on s390), and at the same time
> clobbers it. There doesn't appear to be anything wrong with such
> types of insns as far as I can see; however, those two places prevent
> combine from generating such insns in several cases.
CLOBBER is used to indicate that a value is destroyed by the insn, but
it doesn't say precisely when this happens. In the case of hard
registers we have to be conservative, because there is no way to convey
the equivalent of an early-clobber operand (a value that is destroyed
before all the other inputs have been processed).