public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ian at airs dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/15792] missed subreg optimization
Date: Tue, 07 Feb 2006 00:30:00 -0000	[thread overview]
Message-ID: <20060207003011.26872.qmail@sourceware.org> (raw)
In-Reply-To: <bug-15792-6528@http.gcc.gnu.org/bugzilla/>



------- Comment #8 from ian at airs dot com  2006-02-07 00:30 -------
Yes, I still get an unnecessary move in your test case which uses addition.

One reason this happens is because the addition can not be split until after
the reload pass is complete.  That is because the add relies on the condition
code registers, but reload can clobber the condition code registers between any
arbitrary pair of instructions.

Another reason this happens is that the compiler knows how to set the condition
flags using a bitwise or, but it does so using a scratch register to hold the
destination of the bitwise or.  The register allocator is not clever enough to
see that if it has a DImode pair of registers which dies in the insn, that it
can use the second register in the DImode pair as the scratch register.  If the
register allocator saw that, then it could use that register as the scratch
register and avoid allocating a new scratch register and copying the value into
it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15792


  parent reply	other threads:[~2006-02-07  0:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-15792-6528@http.gcc.gnu.org/bugzilla/>
2006-01-18  4:45 ` pinskia at gcc dot gnu dot org
2006-01-20 15:48 ` tony dot linthicum at amd dot com
2006-01-20 15:52 ` pinskia at gcc dot gnu dot org
2006-02-02 18:18 ` ian at airs dot com
2006-02-06 17:13 ` tony dot linthicum at amd dot com
2006-02-07  0:30 ` ian at airs dot com [this message]
2006-02-07  8:23 ` ian at airs dot com
2007-11-10  0:15 ` rask at gcc dot gnu dot org
     [not found] <bug-15792-4@http.gcc.gnu.org/bugzilla/>
2021-10-15  3:00 ` gabravier at gmail dot com
2023-05-15  5:34 ` pinskia at gcc dot gnu.org
2004-06-03  4:27 [Bug rtl-optimization/15792] New: " pinskia at gcc dot gnu dot org
2004-06-15 20:07 ` [Bug rtl-optimization/15792] " bangerth at dealii dot org
2004-08-20 18:47 ` dann at godzilla dot ics dot uci dot edu

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=20060207003011.26872.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).