aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-03-23 11:34:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-03-23 11:34:32 +0000
commit0ac168a1cd87bfefee6f8ebad245080cfe16fc1d (patch)
tree8b6ebe34884569f079b8d732cd6e253f6ca11fac /gcc/tree-vect-loop.c
parent6e349de504c00b9451becd66103ae96eb4b6ad56 (diff)
downloadgcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.zip
gcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.tar.gz
gcc-0ac168a1cd87bfefee6f8ebad245080cfe16fc1d.tar.bz2
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 <rguenther@suse.de> 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
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 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;