aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-02-13 12:40:29 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-02-13 12:40:29 +0000
commitfcdc0d6e6167ef2887ede475210f21a90898c5f1 (patch)
tree6a925779458f601a118c1111003deb72d2bfd0a1 /gcc
parentb7673cdb66d14f70c2d43cf14806dd73b73c84b6 (diff)
downloadgcc-fcdc0d6e6167ef2887ede475210f21a90898c5f1.zip
gcc-fcdc0d6e6167ef2887ede475210f21a90898c5f1.tar.gz
gcc-fcdc0d6e6167ef2887ede475210f21a90898c5f1.tar.bz2
sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn was deleted.
* sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn was deleted. * haifa-sched.c (update_flow_info, REG_WAS_0): Likewise. From-SVN: r17963
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/haifa-sched.c8
-rw-r--r--gcc/sched.c8
3 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7e9af4d..04317eb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Feb 13 20:36:05 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
+ was deleted.
+ * haifa-sched.c (update_flow_info, REG_WAS_0): Likewise.
+
Fri Feb 13 12:18:40 1998 Jeffrey A Law (law@cygnus.com)
* genextract.c (main): Fix typo.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index b301240..e8f159a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -7978,6 +7978,14 @@ update_flow_info (notes, first, last, orig_insn)
break;
case REG_WAS_0:
+ /* If the insn that set the register to 0 was deleted, this
+ note cannot be relied on any longer. The destination might
+ even have been moved to memory.
+ This was observed for SH4 with execute/920501-6.c compilation,
+ -O2 -fomit-frame-pointer -finline-functions . */
+ if (GET_CODE (XEXP (note, 0)) == NOTE
+ || INSN_DELETED_P (XEXP (note, 0)))
+ break;
/* This note applies to the dest of the original insn. Find the
first new insn that now has the same dest, and move the note
there. */
diff --git a/gcc/sched.c b/gcc/sched.c
index b95241b..2fae2d4 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -3854,6 +3854,14 @@ update_flow_info (notes, first, last, orig_insn)
break;
case REG_WAS_0:
+ /* If the insn that set the register to 0 was deleted, this
+ note cannot be relied on any longer. The destination might
+ even have been moved to memory.
+ This was observed for SH4 with execute/920501-6.c compilation,
+ -O2 -fomit-frame-pointer -finline-functions . */
+ if (GET_CODE (XEXP (note, 0)) == NOTE
+ || INSN_DELETED_P (XEXP (note, 0)))
+ break;
/* This note applies to the dest of the original insn. Find the
first new insn that now has the same dest, and move the note
there. */