summaryrefslogtreecommitdiff
path: root/gcc/sched.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-13 12:40:29 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>1998-02-13 12:40:29 +0000
commit2e3893410b869103d753e883d1a36d0bb75c2702 (patch)
tree6a925779458f601a118c1111003deb72d2bfd0a1 /gcc/sched.c
parent23d33b75e164e3ae3be16ed12f2930c22d2e5161 (diff)
downloadgcc-2e3893410b869103d753e883d1a36d0bb75c2702.tar.gz
* sched.c (update_flow_info, REG_WAS_0): Ignore if setting insn
was deleted. * haifa-sched.c (update_flow_info, REG_WAS_0): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17963 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched.c')
-rw-r--r--gcc/sched.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/sched.c b/gcc/sched.c
index b95241be765..2fae2d423d1 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. */