public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Kamil Iskra <kamil@dwd.interkom.pl>
Cc: Jim Wilson <wilson@cygnus.com>, egcs@cygnus.com
Subject: Re: Loop optimizer misses simple optimisation?
Date: Sun, 03 May 1998 14:15:00 -0000	[thread overview]
Message-ID: <19466.894225692@hurl.cygnus.com> (raw)
In-Reply-To: <Pine.LNX.3.96.980502143213.581F-100000@jinks.home>

  In message < Pine.LNX.3.96.980502143213.581F-100000@jinks.home >you write:
  > I don't know enough about division instructions available in m68020+, but
  > it looks to me from the above that there is an instruction that doesn't
  > generate the reminder, and that it is actually generated when the reminder
  > is not needed. Wouldn't it be better to move it to a separate, new udivsi3
  > pattern, instead of relying on REG_UNUSED, which is only available when
  > optimising, I suppose? This would allow the LICM code to do a better job,
  > wouldn't it?
In general, GCC does a poor job of certain optimizations for insns
that have multiple outputs (including LICM, contant propagation, etc).

It might be worth an experiment to split up the divmod insns into
div, mod and a unnamed divmod insn (for the combiner).  Though my
experience with other ports tends to make me believe the best
overall code is produced with the divmod insn.

However, a div or mod operation can not generally be moved out of
a loop unless you know it won't trap (divide by zero).

jeff

  reply	other threads:[~1998-05-03 14:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-28  7:23 Kamil Iskra
1998-04-28 19:14 ` Richard Henderson
1998-04-29 14:48   ` PÃ¥l-Kristian Engstad
1998-04-29 16:08     ` Richard Henderson
1998-04-28 19:49 ` Michael Meissner
1998-04-29 15:21 ` Jim Wilson
1998-05-02  6:13   ` Kamil Iskra
1998-05-03 14:15     ` Jeffrey A Law [this message]
1998-05-03 15:32       ` Jim Wilson
1998-05-03 20:10         ` Jeffrey A Law
1998-05-06  7:42           ` Was: " John Vickers
1998-05-06  9:19             ` Jeffrey A Law
1998-05-06 11:36             ` Joern Rennecke
1998-05-07  5:15               ` John Vickers

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=19466.894225692@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=kamil@dwd.interkom.pl \
    --cc=wilson@cygnus.com \
    /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).