public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: "H. J. Lu" <hjl@lucon.org>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc@gcc.gnu.org
Subject: Re: Redundant instructions in loop optimization for x86-64?
Date: Sat, 11 Sep 2004 11:51:00 -0000	[thread overview]
Message-ID: <20040911105746.GA10129@kam.mff.cuni.cz> (raw)
In-Reply-To: <20040910165450.GA8456@lucon.org>

> On Fri, Sep 10, 2004 at 11:50:23AM +0200, Jan Hubicka wrote:
> > > It seems that gcc 3.4 and 4.0 generate redundant instructions in loop
> > > optimization for x86-64:
> > > 
> > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17387
> > > 
> > > Does anyone know why?
> > 
> > It is a zero extension GCC believe to be essential.
> 
> Is there a way to tell gcc that 32bit zero extension isn't needed for
> x86-64?

GCC partly knows about this via combine pattern (ie if the computation
of the value is directly preceeding 32bit operation, it should get these
combined as there are combine patterns for it.

In this case GCC thinkgs that both zero extended and not-zero extended
values are needed (one for addressing, other for next iteration) and
thus combine won't try it.
Of course this is just stupid as both values can live in the same
registers - if we had pass noticing this and converting the later use
into subreg, we would get this optimized out.
Perhaps the pass to elliminate more extension posted somewhere can take
care of this.
> 
> 
> H.J.

      parent reply	other threads:[~2004-09-11 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-10  0:22 H. J. Lu
2004-09-10 10:17 ` Jan Hubicka
2004-09-10 17:35   ` H. J. Lu
2004-09-10 22:15     ` James E Wilson
2004-09-10 23:44       ` H. J. Lu
2004-09-11  0:10         ` James E Wilson
2004-09-11  1:58       ` Jan Hubicka
2004-09-11 11:51     ` Jan Hubicka [this message]

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=20040911105746.GA10129@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=gcc@gcc.gnu.org \
    --cc=hjl@lucon.org \
    --cc=hubicka@ucw.cz \
    /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).