public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: wilson@cygnus.com (Jim Wilson)
Cc: hjl@lucon.org, law@cygnus.com, scox@cygnus.com,
	crux@pool.informatik.rwth-aachen.de, egcs@cygnus.com
Subject: Re: More fp bug in egcs
Date: Mon, 04 May 1998 11:17:00 -0000	[thread overview]
Message-ID: <m0yWMtF-000268C@ocean.lucon.org> (raw)
In-Reply-To: <199805032313.QAA08384@rtl.cygnus.com>

> 
> One reason for keeping output reloads, even though the register is dead, is
> for debugging purposes.  With your patch, it looks like debugging of 
> unoptimized code would not work right.  It would be OK to do this
> when optimizing, but that would not fix the x86 bug.
> 

If the register is clobbered, isn't the value in it random? If it is
tru, how can it help debugging? I changed my patch to omit the output
reload if it is in the source and is clobbered. Does it look safe?


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

	* reload1.c (emit_reload_insns): Don't output the last reload
	insn if OLD is the src of INSN and is clobbered by INSN.

--- ../../../import/egcs/gcc/reload1.c	Mon Apr 20 08:23:47 1998
+++ ./reload1.c	Sun May  3 18:57:26 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 the src of INSN
+		 and is clobbered by INSN. */
+	      if (GET_CODE (old) != REG || !(set = single_set (insn))
+		  || !reg_mentioned_p (old, SET_SRC (set))
+		  || !regno_clobbered_p (REGNO (old), insn))
+		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-04 11:17 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
1998-05-03 17:14   ` Jim Wilson
1998-05-04 11:17     ` H.J. Lu [this message]
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=m0yWMtF-000268C@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=crux@pool.informatik.rwth-aachen.de \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.com \
    --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).