summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-27 09:39:14 +0000
committercrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-27 09:39:14 +0000
commitb7a4ac67f9d0829555dc11e591a7dba24c87c99b (patch)
treed990e8b1d637e4db51f9f8488d7b3a0e29227fea
parent089aa77cfc34edeca2d29bf1c99c929fa0e8fcb1 (diff)
downloadppe42-gcc-b7a4ac67f9d0829555dc11e591a7dba24c87c99b.tar.gz
ppe42-gcc-b7a4ac67f9d0829555dc11e591a7dba24c87c99b.zip
Fix for 'Deadly optimization bug' (see egcs mailing list archive)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28928 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2085fc8caac..6e6ffd4c575 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Fri Aug 27 10:33:35 1999 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * combine.c (get_last_value): Don't look for earlier sets if the last
+ known set is somewhere in between the insns being combined.
+
Fri Aug 27 10:03:12 BST 1999 Nathan Sidwell <nathan@acm.org>
* configure.in: Don't use shell ! to negate exit codes
diff --git a/gcc/combine.c b/gcc/combine.c
index dcd60c2cec4..9bedd6118f9 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10832,6 +10832,11 @@ get_last_value (x)
{
rtx insn, set;
+ /* We can't do anything if the value is set in between the insns we are
+ processing. */
+ if (INSN_CUID (reg_last_set[regno]) <= INSN_CUID (subst_insn))
+ return 0;
+
/* We can not do anything useful in this case, because there is
an instruction which is not on the insn chain. */
if (subst_prev_insn)
OpenPOWER on IntegriCloud