This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Commited unroll patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: Commited unroll patch
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 21 Aug 2000 22:06:25 +0200
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
I have commited following patch to fix gcc.c-torture/execute/20000819-1.c
testcase (in addition to removing that test's XFAIL).
The issue is that we need to ensure in loop_find_equiv_value that the
equivalent value does not change between the point it is assigned to the
register we're looking for and loop start. In the testcase this value was
modified in between, so loop thought there is just one iteration.
This patch has been reviewed by Geoff Keating, bootstrapped on i386 and did
not produce any regressions.
2000-08-21 Jakub Jelinek <jakub@redhat.com>
* unroll.c (loop_find_equiv_value): If ret is modified between
insn and loop_start, ret might not be equivalent to reg.
--- gcc/unroll.c.jj Fri Aug 18 23:44:09 2000
+++ gcc/unroll.c Mon Aug 21 17:28:09 2000
@@ -3550,6 +3550,11 @@ loop_find_equiv_value (loop, reg)
ret = XEXP (note, 0);
else
ret = SET_SRC (set);
+
+ /* We cannot do this if it changes between the
+ assignment and loop start though. */
+ if (modified_between_p (ret, insn, loop_start))
+ ret = reg;
}
break;
}
Jakub