From: John F. Carr Date: Sat, 23 Aug 1997 23:25:05 +0000 (+0000) Subject: unroll.c (find_splittable_givs): Only share if two givs have the same add and multipl... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b6ffe60242bddf106e906be802b5f739c266fc31;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ec6a68100e..483e9dbcfb1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Aug 23 18:19:40 1997 John F. Carr + + * 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 * m68k/next.h (GO_IF_INDEXABLE_BASE): Fix typo in undef. diff --git a/gcc/unroll.c b/gcc/unroll.c index f1864d398b4..2fb1f9a8415 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;