public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeffrey A Law <law@cygnus.com>
To: Jim Wilson <wilson@cygnus.com>
Cc: egcs@cygnus.com, Torbjorn Granlund <tege@pdc.kth.se>,
	"David S. Miller" <davem@jenolan.rutgers.edu>
Subject: Re: This was fun to track down
Date: Wed, 24 Sep 1997 23:15:00 -0000	[thread overview]
Message-ID: <19356.875168270@hurl.cygnus.com> (raw)
In-Reply-To: <199709241957.MAA01872@cygnus.com>

  In message < 199709241957.MAA01872@cygnus.com >you write:
  > I see no reason why expand_divmod needs to call convert_modes in this case.
  > If we are passed in a constant value, then we should keep the value as a
  > constant, so that we have a chance of emitting optimized code for the divide.
  > There is no need to emit insns to perform an actual conversion on the value.
  > All we need to do is convert the RTL itself, and I don't even think that is
  > necessary, since a CONST_INT is valid regardless of the mode.
  > 
  > Hence, it looks like expmed.c should be calling gen_lowpart (or something
  > similar) instead of convert_modes if op1 is a constant.  This will give
  > better code than the current patch by retaining the constant.
Note the following comment in convert_modes; it may apply to any attempt
to use gen_lowpart:

  /* There is one case that we must handle specially: If we are converting
     a CONST_INT into a mode whose size is twice HOST_BITS_PER_WIDE_INT and
     we are to interpret the constant as unsigned, gen_lowpart will do
     the wrong if the constant appears negative.  What we want to do is
     make the high-order word of the constant zero, not all ones.  */

  reply	other threads:[~1997-09-24 23:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-22 19:37 David S. Miller
1997-09-23  0:25 ` Jeffrey A Law
1997-09-23  1:49 ` Torbjorn Granlund
1997-09-23 14:09   ` David S. Miller
1997-09-23 13:41 ` Torbjorn Granlund
1997-09-23 13:50   ` David S. Miller
1997-09-23 13:57     ` Torbjorn Granlund
1997-09-23 14:16       ` David S. Miller
1997-09-23 19:05       ` Jeffrey A Law
1997-09-24 12:58         ` Jim Wilson
1997-09-24 23:15           ` Jeffrey A Law [this message]
1997-09-27 13:40             ` Torbjorn Granlund
1997-09-27 23:38               ` Jeffrey A Law
1997-09-29 11:53               ` Jim Wilson

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=19356.875168270@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=davem@jenolan.rutgers.edu \
    --cc=egcs@cygnus.com \
    --cc=tege@pdc.kth.se \
    --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).