]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
unroll.c (find_splittable_givs): For a DEST_ADDR giv...
authorJeffrey A Law <law@cygnus.com>
Fri, 15 Jan 1999 01:54:12 +0000 (01:54 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 Jan 1999 01:54:12 +0000 (18:54 -0700)
        * unroll.c (find_splittable_givs): For a DEST_ADDR giv, do not share
        a register with another DEST_ADDR giv if the address is not valid.

From-SVN: r24674

gcc/ChangeLog
gcc/unroll.c

index 90ef799ef3b16bf41c6c2c61280a84fb3021569e..688008488b522f158b636ea89c438ca768f4db9d 100644 (file)
@@ -1,5 +1,8 @@
 Fri Jan 15 01:19:42 1999  Jeffrey A Law  (law@cygnus.com)
 
+       * unroll.c (find_splittable_givs): For a DEST_ADDR giv, do not share
+       a register with another DEST_ADDR giv if the address is not valid.
+
        * h8300.h (ASM_OUTPUT_LABELREF): Use asm_fprintf, not fprintf.
 
 Mon Jan 11 20:23:34 1999  Richard Henderson  <rth@cygnus.com>
index 72f1f046442b7937a785b93a971398c9c5833ba8..cfb51f66c3732db242bef7da1b909e50cf2814fc 100644 (file)
@@ -1,5 +1,5 @@
 /* Try to unroll loops, and split induction variables.
-   Copyright (C) 1992, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 93, 94, 95, 97, 98, 1999 Free Software Foundation, Inc.
    Contributed by James E. Wilson, Cygnus Support/UC Berkeley.
 
 This file is part of GNU CC.
@@ -2925,8 +2925,11 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
                          To share a register here, the values must be
                          equal.  */
                       && rtx_equal_p (v->same->mult_val, v->mult_val)
-                      && rtx_equal_p (v->same->add_val, v->add_val))
-
+                      && rtx_equal_p (v->same->add_val, v->add_val)
+                      /* If the memory references have different modes,
+                         then the address may not be valid and we must
+                         not share registers.  */
+                      && verify_addresses (v, giv_inc, unroll_number))
                {
                  v->dest_reg = v->same->dest_reg;
                  v->shared = 1;