aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-10-15 10:09:10 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-10-15 10:09:10 +0000
commitc30587c0200f52f8845a5aea21bd7bef6cbe0bf4 (patch)
tree30bc1414aafb9c90a81b1222e2bf97e040fec114 /gcc/tree-vect-loop.c
parenta7c4d6d1c29b62d97014d30848ee542e309dbe9c (diff)
downloadgcc-c30587c0200f52f8845a5aea21bd7bef6cbe0bf4.zip
gcc-c30587c0200f52f8845a5aea21bd7bef6cbe0bf4.tar.gz
gcc-c30587c0200f52f8845a5aea21bd7bef6cbe0bf4.tar.bz2
re PR fortran/92094 (ice in vect_transform_stmt at tree-vect-stmts.c:10921)
2019-10-15 Richard Biener <rguenther@suse.de> PR tree-optimization/92094 * tree-vect-loop.c (vectorizable_reduction): For nested cycles do not adjust the reduction definition def type. * tree-vect-stmts.c (vect_transform_stmt): Verify the scalar stmt defines the latch argument of the PHI. * gfortran.dg/pr92094.f90: New testcase. From-SVN: r276987
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index de018ac..4552510 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -5742,20 +5742,9 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node,
if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle)
{
if (is_a <gphi *> (stmt_info->stmt))
- {
- /* Analysis for double-reduction is done on the outer
- loop PHI, nested cycles have no further restrictions. */
- STMT_VINFO_TYPE (stmt_info) = cycle_phi_info_type;
- /* For nested cycles we want to let regular vectorizable_*
- routines handle code-generation. */
- if (STMT_VINFO_DEF_TYPE (reduc_info) != vect_double_reduction_def)
- {
- stmt_info = STMT_VINFO_REDUC_DEF (stmt_info);
- STMT_VINFO_DEF_TYPE (stmt_info) = vect_internal_def;
- STMT_VINFO_DEF_TYPE (vect_stmt_to_vectorize (stmt_info))
- = vect_internal_def;
- }
- }
+ /* Analysis for double-reduction is done on the outer
+ loop PHI, nested cycles have no further restrictions. */
+ STMT_VINFO_TYPE (stmt_info) = cycle_phi_info_type;
else
STMT_VINFO_TYPE (stmt_info) = reduc_vec_info_type;
return true;