Use-and-clobber insns and some ancient combine.c code
Joern Rennecke
joern.rennecke@superh.com
Fri Jun 18 18:16:00 GMT 2004
>
> 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.
More information about the Gcc
mailing list