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


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


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