loop.c (check_dbra_loop): A store using an address giv for which we have no life...
authorMichael Meissner <meissner@cygnus.com>
Sat, 6 Feb 1999 00:46:54 +0000 (00:46 +0000)
committerJeff Law <law@gcc.gnu.org>
Sat, 6 Feb 1999 00:46:54 +0000 (17:46 -0700)
        * loop.c (check_dbra_loop): A store using an address giv for which
        we have no life information is not reversible.

From-SVN: r25051

gcc/ChangeLog
gcc/loop.c

index 1fdb2f0f21a36058ce3522bf75c08c4d291d9b67..1bb6c993eab3a3be66b412cb8344df0c71cffdf7 100644 (file)
@@ -1,3 +1,8 @@
+1999-02-05  Michael Meissner  <meissner@cygnus.com>
+
+       * loop.c (check_dbra_loop): A store using an address giv for which
+       we have no life information is not reversible.
+
 Fri Feb  5 17:08:01 1999  Dave Brolley  <brolley@cygnus.com>
 
         * function.c (fixup_var_refs): Scan catch_clauses too.
index 29ef980ab9aa4993c9b500966ed87ef3f27bc376..d5b73a67d6442258f1962ea52b2949a877724db6 100644 (file)
@@ -7713,8 +7713,9 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info)
                  if (v->giv_type == DEST_REG
                      && reg_mentioned_p (v->dest_reg,
                                          XEXP (loop_store_mems, 0))
-                     && (INSN_LUID (v->insn)
-                         > INSN_LUID (first_loop_store_insn)))
+                     && (INSN_UID (v->insn) >= max_uid_for_loop
+                         || (INSN_LUID (v->insn)
+                             > INSN_LUID (first_loop_store_insn))))
                    reversible_mem_store = 0;
                }
            }