public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@cygnus.com>
To: Richard Henderson <rth@cygnus.com>
Cc: "H.J. Lu" <hjl@lucon.org>, egcs@cygnus.com
Subject: Re: More info on alpha bug
Date: Tue, 28 Oct 1997 15:58:00 -0000	[thread overview]
Message-ID: <199710282315.PAA08028@cygnus.com> (raw)
In-Reply-To: <19971027183448.55503@dot.cygnus.com>

	Mon Oct 27 18:18:00 1997  Richard Henderson  <rth@cygnus.com>

	* reload1.c (eliminate_regs [SET]): If [SUBREG] widened the mode of
	DEST for the spill, adjust mode of SRC to compensate.

This patch looks OK to me.

	In this example, the above code kicks in and widens the destination of
	the store, but the source stays in SImode.  This leads to 

	  (set (mem:DI (plus (reg $30) (const_int 120)))
	       (reg:SI $1)))

	which somehow fails to choke the backend and yields an SImode store in
	the assembly.

Yes, that is wierd.  I looked at it out of curiousity.  It can fail only
if we try to recognize the instruction.  However, the instruction had already
been recognized (as movdf+1) before reload ran, and reload does not bother to
re-recognize an instruction when performing simple reloads on them, hence we
never notice the problem.

	I don't know if this is better or worse than adjusting the mode of SRC
	directly, but I have the idea that the size of references to registers
	should be consistent one to the next, with subreg thrown in if necessary
	to hide the differences.

Pseudos are represented by a unique RTX, and hence have a fixed mode.  If
you need a different mode for a pseudo, you must use a SUBREG.  Hard registers
can be represented by multiple RTXes, and can have any mode allowed by
HARD_REGNO_MODE_OK.  If you have a hard register, then creating a SUBREG is
not necessary.  Creating a SUBREG for a hard register should be harmless
though.

Jim

  reply	other threads:[~1997-10-28 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-20 18:57 H.J. Lu
1997-10-27 18:40 ` Richard Henderson
1997-10-28 15:58   ` Jim Wilson [this message]
1998-09-23  8:43 H.J. Lu
1998-09-23  9:38 ` Richard Henderson

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=199710282315.PAA08028@cygnus.com \
    --to=wilson@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=hjl@lucon.org \
    --cc=rth@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).