* 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
+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.
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;