This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
- From: "irar at il dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 26 Feb 2011 14:45:50 +0000
- Subject: [Bug tree-optimization/47890] [4.5/4.6 Regression] internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1186
- Auto-submitted: auto-generated
- References: <bug-47890-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47890
--- Comment #5 from Ira Rosen <irar at il dot ibm.com> 2011-02-26 14:45:30 UTC ---
Similar to your patch, Richard, but with different related stmt:
@@ -2886,6 +3024,10 @@ get_initial_def_for_induction (gimple iv
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));
}
The problem is that we first create copies and store them in RELATED_STMT
starting from INDUCTION_PHI, and then handle the cast. So, this patch copies
RELATED_STMT from INDUCTION_PHI to the VIEW_CONVERT stmt.
Ira