(get_last_value): Revert back to use prev_nonnote_insn instead of prev_real_insn.
authorJim Wilson <wilson@gcc.gnu.org>
Thu, 30 Mar 1995 23:34:12 +0000 (15:34 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 30 Mar 1995 23:34:12 +0000 (15:34 -0800)
(get_last_value): Revert back to use prev_nonnote_insn
instead of prev_real_insn.  Modify test that ignores USE insns.

From-SVN: r9268

gcc/combine.c

index 0ec186b70cf050af3aed3ffa6eb32ee40bbfb73a..b25191e587f2678466c24898c475c4e869749595 100644 (file)
@@ -9869,11 +9869,13 @@ get_last_value (x)
 
       /* Skip over USE insns.  They are not useful here, and they may have
         been made by combine, in which case they do not have a INSN_CUID
-        value.  */
-      for (insn = prev_real_insn (subst_insn);
-          insn && (GET_CODE (PATTERN (insn)) == USE
+        value.  We can't use prev_real_insn, because that would incorrectly
+        take us backwards across labels.  */
+      for (insn = prev_nonnote_insn (subst_insn);
+          insn && ((GET_CODE (insn) == INSN
+                    && GET_CODE (PATTERN (insn)) == USE)
                    || INSN_CUID (insn) >= subst_low_cuid);
-          insn = prev_real_insn (insn))
+          insn = prev_nonnote_insn (insn))
        ;
 
       if (insn