From 0ac168a1cd87bfefee6f8ebad245080cfe16fc1d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 23 Mar 2012 11:34:32 +0000 Subject: re PR tree-optimization/52678 (internal compiler error: in vect_update_ivs_after_vectorizer, at tree-vect-loop-manip.c:1842) 2012-03-23 Richard Guenther PR tree-optimization/52678 * tree-vectorizer.h (struct _stmt_vec_info): Add loop_phi_evolution_part member. (STMT_VINFO_LOOP_PHI_EVOLUTION_PART): New define. * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Initialize STMT_VINFO_LOOP_PHI_EVOLUTION_PART. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Use the cached evolution part and the PHI nodes value from the loop preheader edge instead of re-analyzing the evolution. * gfortran.dg/pr52678.f: New testcase. From-SVN: r185734 --- gcc/tree-vect-loop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree-vect-loop.c') diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index abf131e..1b4ed88 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -579,6 +579,10 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop) continue; } + STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo) + = evolution_part_in_loop_num (access_fn, loop->num); + gcc_assert (STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo) != NULL_TREE); + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Detected induction."); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def; -- cgit v1.1