public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* mov arguments are still the same
@ 2011-03-16 18:19 Paulo J. Matos
  2011-03-24 17:21 ` Paulo J. Matos
  0 siblings, 1 reply; 2+ messages in thread
From: Paulo J. Matos @ 2011-03-16 18:19 UTC (permalink / raw)
  To: gcc

Hi,

I have touched this subject before:
http://thread.gmane.org/gmane.comp.gcc.devel/116198/focus=116200

Now, at the time I didn't pursue this issue but now with 4.4.4 this 
keeps happening and I traced it to the cprop_hardreg replacing a 
register which makes the set insn having the same source and dest.

Here's insn 32 from pass 183:ce3

(insn 32 31 33 4 h.c:51 (set (reg:QI 1 AL)
         (reg/f:QI 8 @H'fff9 [33])) 4 {*movqi} (expr_list:REG_DEAD 
(reg/f:QI 8 @H'fff9 [33])
         (expr_list:REG_EQUAL (plus:QI (reg/f:QI 6 Y)
                 (const_int 1 [0x1]))
             (nil))))


Now the same insn after the following pass 185:cprop_hardreg


insn 32: replaced reg 8 with 1

...

(insn 32 31 33 4 h.c:51 (set (reg:QI 1 AL)
         (reg/f:QI 1 AL [33])) 4 {*movqi} (expr_list:REG_DEAD (reg/f:QI 
8 @H'fff9 [33])
         (expr_list:REG_EQUAL (plus:QI (reg/f:QI 6 Y)
                 (const_int 1 [0x1]))
             (nil))))


This stays as is until assembler generation, which is really annoying 
cause it generates an instruction (which is basically a nop) like:
...
mov AL,AL
...

Is this a known issue? I can't see how this is a problem with my backend 
but might as well be. Maybe cprop_regmove should check if it is making 
the src equal to dest and if it is remove the insn?

Any suggestions?

--
PMatos

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mov arguments are still the same
  2011-03-16 18:19 mov arguments are still the same Paulo J. Matos
@ 2011-03-24 17:21 ` Paulo J. Matos
  0 siblings, 0 replies; 2+ messages in thread
From: Paulo J. Matos @ 2011-03-24 17:21 UTC (permalink / raw)
  To: gcc

Let me revive this thread and ask for suggestions/tips on the issue below.

Cheers,

PMatos

On 16/03/11 18:19, Paulo J. Matos wrote:
> Hi,
>
> I have touched this subject before:
> http://thread.gmane.org/gmane.comp.gcc.devel/116198/focus=116200
>
> Now, at the time I didn't pursue this issue but now with 4.4.4 this
> keeps happening and I traced it to the cprop_hardreg replacing a
> register which makes the set insn having the same source and dest.
>
> Here's insn 32 from pass 183:ce3
>
> (insn 32 31 33 4 h.c:51 (set (reg:QI 1 AL)
> (reg/f:QI 8 @H'fff9 [33])) 4 {*movqi} (expr_list:REG_DEAD (reg/f:QI 8
> @H'fff9 [33])
> (expr_list:REG_EQUAL (plus:QI (reg/f:QI 6 Y)
> (const_int 1 [0x1]))
> (nil))))
>
>
> Now the same insn after the following pass 185:cprop_hardreg
>
>
> insn 32: replaced reg 8 with 1
>
> ...
>
> (insn 32 31 33 4 h.c:51 (set (reg:QI 1 AL)
> (reg/f:QI 1 AL [33])) 4 {*movqi} (expr_list:REG_DEAD (reg/f:QI 8 @H'fff9
> [33])
> (expr_list:REG_EQUAL (plus:QI (reg/f:QI 6 Y)
> (const_int 1 [0x1]))
> (nil))))
>
>
> This stays as is until assembler generation, which is really annoying
> cause it generates an instruction (which is basically a nop) like:
> ...
> mov AL,AL
> ...
>
> Is this a known issue? I can't see how this is a problem with my backend
> but might as well be. Maybe cprop_regmove should check if it is making
> the src equal to dest and if it is remove the insn?
>
> Any suggestions?
>
> --
> PMatos
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-24 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-16 18:19 mov arguments are still the same Paulo J. Matos
2011-03-24 17:21 ` 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).