* loop.c (check_dbra_loop): When checking a loop for
authorcpopetz <cpopetz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Jan 2000 16:07:00 +0000 (16:07 +0000)
committercpopetz <cpopetz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 23 Jan 2000 16:07:00 +0000 (16:07 +0000)
reversability, check the source of any stores to ensure
they don't depend on an initial value.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31569 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/loop.c

index 56d4404..1048b56 100644 (file)
@@ -1,3 +1,9 @@
+2000-01-23  Clinton Popetz  <cpopetz@cygnus.com>
+
+       * loop.c (check_dbra_loop): When checking a loop for
+       reversability, check the source of any stores to ensure
+       they don't depend on an initial value.
+
 2000-01-23  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
 
        * config/c4x/c4x.h (ASM_OUTPUT_BSS): Redefine.
index 833a0a9..936adfb 100644 (file)
@@ -8042,7 +8042,7 @@ check_dbra_loop (loop, insn_count)
                {
                  if (v->giv_type == DEST_REG
                      && reg_mentioned_p (v->dest_reg,
-                                         XEXP (loop_store_mems, 0))
+                                        PATTERN (first_loop_store_insn)) 
                      && loop_insn_first_p (first_loop_store_insn, v->insn))
                    reversible_mem_store = 0;
                }