aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn F. Carr <jfc@mit.edu>1997-08-23 23:25:05 +0000
committerJeff Law <law@gcc.gnu.org>1997-08-23 17:25:05 -0600
commitb6ffe60242bddf106e906be802b5f739c266fc31 (patch)
treed1b4496c251a555ed6ae53276f02d7a5a0fac110
parent2ebfd23067727c451e9cfc42e7c2fffb5ed7f006 (diff)
downloadgcc-b6ffe60242bddf106e906be802b5f739c266fc31.zip
gcc-b6ffe60242bddf106e906be802b5f739c266fc31.tar.gz
gcc-b6ffe60242bddf106e906be802b5f739c266fc31.tar.bz2
unroll.c (find_splittable_givs): Only share if two givs have the same add and multiply values.
* unroll.c (find_splittable_givs): Only share if two givs have the same add and multiply values. Fixes some testsuite failures on the x86. From-SVN: r14908
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/unroll.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4ec6a68..483e9db 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Sat Aug 23 18:19:40 1997 John F. Carr <jfc@mit.edu>
+
+ * unroll.c (find_splittable_givs): Only share if two givs have the
+ same add and multiply values.
+
Sat Aug 23 14:36:27 1997 Jim Wilson <wilson@cygnus.com>
* m68k/next.h (GO_IF_INDEXABLE_BASE): Fix typo in undef.
diff --git a/gcc/unroll.c b/gcc/unroll.c
index f1864d3..2fb1f9a 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -2849,7 +2849,14 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
else if (unroll_type != UNROLL_COMPLETELY
&& v->giv_type == DEST_ADDR
&& v->same && v->same->giv_type == DEST_ADDR
- && v->same->unrolled)
+ && v->same->unrolled
+ /* combine_givs_p may return true for some cases
+ where the add and mult values are not equal.
+ 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))
+
{
v->dest_reg = v->same->dest_reg;
v->shared = 1;