Fix for 'Deadly optimization bug' (see egcs mailing list archive)
authorBernd Schmidt <bernds@cygnus.co.uk>
Fri, 27 Aug 1999 09:39:14 +0000 (09:39 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Fri, 27 Aug 1999 09:39:14 +0000 (09:39 +0000)
From-SVN: r28928

gcc/ChangeLog
gcc/combine.c

index 2085fc8caac3a4c9731e608ea6fce441bf15b044..6e6ffd4c575eb50f63d091641017ab4d787ac23a 100644 (file)
@@ -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
index dcd60c2cec4a76203656b5ba42391c2709d456e3..9bedd6118f95bde49ad1e21bfb45e304a61e2f9b 100644 (file)
@@ -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)