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: mov arguments are the same


"Paulo J. Matos" <pocmatos@gmail.com> writes:

> In a rule like
>  (set (match_operand 0 ...)
>         (match_operand 1 ...))
>
> I sometimes have operand0 equal to operand1, as in
> rtx_equal_p(operand[0], operand[1]) == 1.
> This generates a move between the same location (same as a nop).
>
> Is there a reason for getting this and is it up to me to handle it or
> this is just the result of some problem with my md file? I am in
> gcc4.4.4.

Moves between the same register are normally eliminated by a loop at the
end of reload().  Does your processor support memory-to-memory moves?  I
don't think anything will explicitly eliminate those, though I'm also
not sure why they would be created in the first place.

I'm surprised that it happens, but I don't know what would cause it.  In
particular I don't know that it is a problem in your MD file.  You'll
have to find out where they are coming from.

Ian


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