summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-01-15 01:54:12 +0000
committerJeff Law <law@gcc.gnu.org>1999-01-14 18:54:12 -0700
commitfe7804f9b87de35b803952e8da9c033eebe20fea (patch)
tree595661a695fe7577d291dfc02301ff54d81c7128 /gcc
parent35df0befa4e7a5be6ca5466e1637e44aad659374 (diff)
downloadgcc-fe7804f9b87de35b803952e8da9c033eebe20fea.tar.gz
unroll.c (find_splittable_givs): For a DEST_ADDR giv...
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/unroll.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90ef799ef3b..688008488b5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 72f1f046442..cfb51f66c37 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -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;