loop.c (check_dbra_loop): Make change from July 17...
authorJeffrey A Law <law@cygnus.com>
Tue, 1 Aug 2000 04:19:47 +0000 (04:19 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 1 Aug 2000 04:19:47 +0000 (22:19 -0600)
        * loop.c (check_dbra_loop): Make change from July 17, 2000 work
        on targets which need more than one insn for a compare/cbranch
        operation.

From-SVN: r35404

gcc/ChangeLog
gcc/loop.c

index 7c9d309616fe6ec98217ee3f32b48ee491d8a25f..7c24fdae4f4d66a36df398223fa48a58b7cc41b8 100644 (file)
@@ -1,3 +1,9 @@
+Mon Jul 31 22:19:24 2000  Jeffrey A Law  (law@cygnus.com)
+
+       * loop.c (check_dbra_loop): Make change from July 17, 2000 work
+       on targets which need more than one insn for a compare/cbranch
+       operation.
+
 2000-07-31  Jim Wilson  <wilson@cygnus.com>
 
        * config/ia64/ia64.c (ia64_function_arg): Use alignment not size
index f812b2e4c76c2bc4f36f938843ce86b6d559e332..20211c67297fdd5ed7c23e29ca6536bbb5a4d810 100644 (file)
@@ -7788,10 +7788,13 @@ check_dbra_loop (loop, insn_count)
   {
     /* If more than one condition is present to control the loop, then
        do not proceed, as this function does not know how to rewrite
-       loop tests with more than one condition.  */
+       loop tests with more than one condition.
+
+       Look backwards from the first insn in the last comparison
+       sequence and see if we've got another comparison sequence.  */
 
     rtx jump1;
-    if ((jump1 = prev_nonnote_insn (jump)) != loop->cont)
+    if ((jump1 = prev_nonnote_insn (first_compare)) != loop->cont)
       if (GET_CODE (jump1) == JUMP_INSN)
         return 0;
   }