unroll.c (find_splittable_givs): For a DEST_ADDR giv...
authorJeffrey A Law <law@cygnus.com>
Fri, 15 Jan 1999 01:53:08 +0000 (01:53 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 Jan 1999 01:53:08 +0000 (18:53 -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: r24673

gcc/ChangeLog
gcc/unroll.c

index fe84462ef48fd579c97867c04b9479f56931d38a..f15b2c45081ff8c55f534164354fd2a39188e97f 100644 (file)
@@ -1,5 +1,8 @@
 Thu Jan 14 22:38:41 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.
+
        * pa.c (hppa_expand_epilogue): Save and restore the static chain
        around the call to mcount.
 
index d36fba5555cdf162131cfb1301e39d85041e25f1..501a6e51792e393ef1f00678ab8a92139c6d82c1 100644 (file)
@@ -2847,8 +2847,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;