public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nathan at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/16797] Opportunity to remove unnecessary load instructions
Date: Wed, 03 Nov 2004 14:40:00 -0000	[thread overview]
Message-ID: <20041103144053.2497.qmail@sourceware.org> (raw)
In-Reply-To: <20040728170038.16797.steinmtz@us.ibm.com>


------- Additional Comments From nathan at gcc dot gnu dot org  2004-11-03 14:40 -------
ug. This bug falls between a number of stools.
1) on ppc-64 ints are returned correctly sign extended to 64 bits
2) the tree-ssa optimizers are blind to parameter marshalling, so the necessary
sign extension is added at the tree->rtl conversion
3) When combine runs, there is still one common exit block containing
      i_64 = contents_of_i
      i_32 = (int)i_64
      result = sign_extend (i_32)
As the 'contents_of_i' are initialized in different blocks, combine has no
knowledge of its possible values.  So, it doesn't know the truncation and
extension is a nop.
4) The terminating bb gets duplicated by bbro right at the end of optimization.
No subsequent cse stage runs after that.

If tree-ssa was made ABI aware, we'd be in much better shape.
This is similar to 16802 but with bb-cloning to further expose the stupidity

-- 


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


  parent reply	other threads:[~2004-11-03 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28 17:00 [Bug other/16797] New: PowerPC - " gcc-bugzilla at gcc dot gnu dot org
2004-07-28 17:36 ` [Bug target/16797] " bangerth at dealii dot org
2004-07-28 18:36 ` [Bug tree-optimization/16797] " pinskia at gcc dot gnu dot org
2004-07-30 18:11 ` steven at gcc dot gnu dot org
2004-11-03 14:40 ` nathan at gcc dot gnu dot org [this message]
2004-11-08 14:07 ` pinskia at gcc dot gnu dot org
2004-11-08 14:16 ` pinskia at gcc dot gnu dot org
2005-06-02 18:47 ` dnovillo at gcc dot gnu dot org
2005-09-10 17:59 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16797-8614@http.gcc.gnu.org/bugzilla/>
2005-11-02 17:16 ` pinskia at gcc dot gnu dot org
2006-08-26  4:37 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16797-4@http.gcc.gnu.org/bugzilla/>
2014-12-15 19:17 ` spop at gcc dot gnu.org

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=20041103144053.2497.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).