(try_merge_delay_insns): Update THREAD if it is split.
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 6 Oct 1994 10:57:08 +0000 (06:57 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 6 Oct 1994 10:57:08 +0000 (06:57 -0400)
From-SVN: r8226

gcc/reorg.c

index 2cff2c985ae290161464c09dfdc9e6d042d1eeef..430bc7d040245fb7c1089e76f4966694092e9533 100644 (file)
@@ -1762,6 +1762,7 @@ try_merge_delay_insns (insn, thread)
   for (trial = thread; !stop_search_p (trial, 1); trial = next_trial)
     {
       rtx pat = PATTERN (trial);
+      rtx oldtrial = trial;
 
       next_trial = next_nonnote_insn (trial);
 
@@ -1781,6 +1782,8 @@ try_merge_delay_insns (insn, thread)
          && (trial = try_split (pat, trial, 0)) != 0
          /* Update next_trial, in case try_split succeeded.  */
          && (next_trial = next_nonnote_insn (trial))
+         /* Likewise THREAD.  */
+         && (thread = oldtrial == thread ? trial : thread)
          && rtx_equal_p (PATTERN (next_to_match), PATTERN (trial))
          /* Have to test this condition if annul condition is different
             from (and less restrictive than) non-annulling one.  */