From: "Paulo J. Matos" <pocmatos@gmail.com>
To: gcc@gcc.gnu.org
Subject: mov arguments are still the same
Date: Wed, 16 Mar 2011 18:19:00 -0000 [thread overview]
Message-ID: <ilquvi$5ra$1@dough.gmane.org> (raw)
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
next reply other threads:[~2011-03-16 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-16 18:19 Paulo J. Matos [this message]
2011-03-24 17:21 ` Paulo J. Matos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ilquvi$5ra$1@dough.gmane.org' \
--to=pocmatos@gmail.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).