* mov arguments are the same
@ 2010-08-24 14:10 Paulo J. Matos
2010-08-24 17:38 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Paulo J. Matos @ 2010-08-24 14:10 UTC (permalink / raw)
To: gcc
Hello,
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.
Cheers,
--
PMatos
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mov arguments are the same
2010-08-24 14:10 mov arguments are the same Paulo J. Matos
@ 2010-08-24 17:38 ` Ian Lance Taylor
2010-08-25 17:10 ` Paulo J. Matos
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2010-08-24 17:38 UTC (permalink / raw)
To: Paulo J. Matos; +Cc: gcc
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mov arguments are the same
2010-08-24 17:38 ` Ian Lance Taylor
@ 2010-08-25 17:10 ` Paulo J. Matos
0 siblings, 0 replies; 3+ messages in thread
From: Paulo J. Matos @ 2010-08-25 17:10 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc
On Tue, Aug 24, 2010 at 3:10 PM, Ian Lance Taylor <iant@google.com> wrote:
> "Paulo J. Matos" <pocmatos@gmail.com> writes:
>
> Moves between the same register are normally eliminated by a loop at the
> end of reload(). Does your processor support memory-to-memory moves?
Nope, not really.
> 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.
>
Thanks for the comments. I was wondering if gcc was generating them
for some purpose I was not aware of.
From your comments I deduce that this is not the case.
Cheers,
--
PMatos
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-25 12:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24 14:10 mov arguments are the same Paulo J. Matos
2010-08-24 17:38 ` Ian Lance Taylor
2010-08-25 17:10 ` Paulo J. Matos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).