public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: hjl@lucon.org (H.J. Lu)
Cc: wilson@cygnus.com, law@cygnus.com, scox@cygnus.com,
	ocean:p3@lucon.org, [51]@cygnus.com,
	crux@pool.informatik.rwth-aachen.de, egcs@cygnus.com
Subject: Re: More fp bug in egcs
Date: Sun, 03 May 1998 12:03:00 -0000	[thread overview]
Message-ID: <m0yW42v-000268C@ocean.lucon.org> (raw)
In-Reply-To: <m0yVtcR-000268C@ocean.lucon.org>

> 
> How does this patch look? It works for my test case.
> 
> I think it is a reload bug. I don't know what the purpose to output the
> last reload for a dead register. I don't what the best solution is and
> I am not sure if my patch covers all cases.
> 

Here is a revised patch. I hope this bug can be fixed in 1.0.3.

Thanks.


H.J.
----
Sun May  3 10:48:40 1998  H.J. Lu  (hjl@gnu.org)

	* reload1.c (emit_reload_insns): Don't output the last reload
	insn if OLD is not the dest of INSN and is dead at the end of
	INSN.

--- ../../../import/egcs/gcc/reload1.c	Mon Apr 20 08:23:47 1998
+++ ./reload1.c	Sun May  3 11:26:28 1998
@@ -6730,8 +6730,17 @@ emit_reload_insns (insn)
 
 	  /* Output the last reload insn.  */
 	  if (! special)
-	    gen_reload (old, reloadreg, reload_opnum[j],
-			reload_when_needed[j]);
+	    {
+	      rtx set;
+
+	      /* Don't output the last reload if OLD is not the dest
+		 of INSN and is dead at the end of INSN. */
+	      if (GET_CODE (old) != REG || !(set = single_set (insn))
+		  || old == SET_DEST (set)
+		  || !dead_or_set_p (insn, old))
+		gen_reload (old, reloadreg, reload_opnum[j],
+			    reload_when_needed[j]);
+	    }
 
 #ifdef PRESERVE_DEATH_INFO_REGNO_P
 	  /* If final will look at death notes for this reg,

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

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-03  0:55 H.J. Lu
1998-05-03 12:03 ` H.J. Lu [this message]
1998-05-03 17:14   ` Jim Wilson
1998-05-04 11:17     ` H.J. Lu
1998-05-04 18:07       ` Jeffrey A Law
1998-05-04 18:07         ` H.J. Lu
1998-05-04 22:00           ` Jeffrey A Law
1998-05-08 16:04           ` Jeffrey A Law
1998-05-03 20:10 ` Jim Wilson
1998-05-05  5:46   ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1998-04-25 18:25 H.J. Lu
1998-04-27 21:29 ` Jim Wilson
1998-04-30 20:03 ` Jim Wilson
1998-05-02 18:56   ` H.J. Lu
1998-05-03 20:10     ` Jim Wilson
1998-05-05  0:35     ` Jeffrey A Law
1998-05-05 19:14       ` H.J. Lu
1998-05-06 11:49         ` Jim Wilson
1998-05-05  5:03   ` Jeffrey A Law

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=m0yW42v-000268C@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=law@cygnus.com \
    --cc=p3@lucon.org \
    --cc=scox@cygnus.com \
    --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).