summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/unroll.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
committerkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
commit2e25f3a6c57335cba50111faceb0ce2ab59e9bcb (patch)
treec6857d31c36dbd89a881b0229bf38b062797d413 /contrib/gcc/unroll.c
parent0895e1acb698e05d503c26bec5471de2e88b7d93 (diff)
downloadFreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.zip
FreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.tar.gz
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT.
Diffstat (limited to 'contrib/gcc/unroll.c')
-rw-r--r--contrib/gcc/unroll.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/gcc/unroll.c b/contrib/gcc/unroll.c
index 6936a71..6be951e 100644
--- a/contrib/gcc/unroll.c
+++ b/contrib/gcc/unroll.c
@@ -3305,7 +3305,8 @@ final_giv_value (loop, v)
/* Try to calculate the final value as a function of the biv it depends
upon. The only exit from the loop must be the fall through at the bottom
- (otherwise it may not have its final value when the loop exits). */
+ and the insn that sets the giv must be executed on every iteration
+ (otherwise the giv may not have its final value when the loop exits). */
/* ??? Can calculate the final giv value by subtracting off the
extra biv increments times the giv's mult_val. The loop must have
@@ -3313,7 +3314,8 @@ final_giv_value (loop, v)
to be known. */
if (n_iterations != 0
- && ! loop->exit_count)
+ && ! loop->exit_count
+ && v->always_executed)
{
/* ?? It is tempting to use the biv's value here since these insns will
be put after the loop, and hence the biv will have its final value
OpenPOWER on IntegriCloud