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: Use-and-clobber insns and some ancient combine.c code


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).

R.


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