This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Use-and-clobber insns and some ancient combine.c code
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: weigand at i1 dot informatik dot uni-erlangen dot de, gcc at gcc dot gnu dot org
- Date: Fri, 18 Jun 2004 19:18:38 +0100 (BST)
- Subject: Re: Use-and-clobber insns and some ancient combine.c code
>
> Your change added a *second* test, for substitution of
>
> (set (reg Y) (...(some use of reg X)...))
> into
> (parallel [ ...(some use of reg Y)... (clobber (reg X)) ...])
>
> It this *this* check I don't understand.
>
> I think it's indeed the earlyclobber issue: you can't be sure that the
> clobber will happen before X is read.
If (reg X) is a fixed register, the pattern shouldn't be recognized
if it is not safe. Hence the combination should be allowed for fixed
registers.
If (reg X) is not a fixed register, the pattern usually can be written
using a match_operand and a sufficiently restrictive constraint.
So in this case, we can either use a pseudo, or make combine
verify that there is a constraint which has no earlyclobber modifier.