summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-01 13:18:25 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-01 13:18:25 +0000
commitffb35eedc3256a30677210abe002bd4898d7bc64 (patch)
tree697d1e535aed98c5072e627d3220ef8acb308f1e /gcc/tree-vect-loop.c
parent4525baee1ed29080845aef4793e30883aa0d2d8d (diff)
downloadgcc-ffb35eedc3256a30677210abe002bd4898d7bc64.tar.gz
2011-03-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47890 * tree-vect-loop.c (get_initial_def_for_induction): Set related stmt properly. * gcc.dg/torture/pr47890.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index d474688ebec..7692eb8bc96 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -2886,6 +2886,10 @@ get_initial_def_for_induction (gimple iv_phi)
gimple_assign_set_lhs (new_stmt, induc_def);
si = gsi_start_bb (bb);
gsi_insert_before (&si, new_stmt, GSI_SAME_STMT);
+ set_vinfo_for_stmt (new_stmt,
+ new_stmt_vec_info (new_stmt, loop_vinfo, NULL));
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (new_stmt))
+ = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (induction_phi));
}
return induc_def;