aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorSebastian Pop <spop@gcc.gnu.org>2010-03-02 10:22:30 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-03-02 10:22:30 +0000
commit61226dc8a6eb0371d39f437813fbb3279d87f723 (patch)
treeb0076122adc5adf6b7a8bd73fa49ac375ec186db /gcc/tree-loop-distribution.c
parentef74edbdd8c9a674de3b7a0a20784de3d6bbb4d8 (diff)
downloadgcc-61226dc8a6eb0371d39f437813fbb3279d87f723.zip
gcc-61226dc8a6eb0371d39f437813fbb3279d87f723.tar.gz
gcc-61226dc8a6eb0371d39f437813fbb3279d87f723.tar.bz2
Fix PR42640: Correctly initialize the value of the new induction variable.
2010-03-02 Reza Yazdani <reza.yazdani@amd.com> PR middle-end/42640 * tree-loop-distribution.c (update_phis_for_loop_copy): Replaced the assignment from the new induction variable to the assignment of the value from the original loop PHI function. * gcc.dg/tree-ssa/pr42640.c: New. From-SVN: r157161
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r--gcc/tree-loop-distribution.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 13ac7ea..920ab8c 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -118,8 +118,8 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop)
if (!new_ssa_name)
/* This only happens if there are no definitions inside the
- loop. Use the phi_result in this case. */
- new_ssa_name = PHI_RESULT (phi_new);
+ loop. Use the the invariant in the new loop as is. */
+ new_ssa_name = def;
}
else
/* Could be an integer. */