re PR tree-optimization/88243 (ice in vect_create_epilog_for_reduction, at tree-vect...
[gcc.git] / gcc / tree-vect-patterns.c
index 2b56d85afc5962df3939befb40f7d81bc121ef7b..39b6f822d198cdaaf587960083c6baf7677bf284 100644 (file)
@@ -4723,7 +4723,15 @@ vect_mark_pattern_stmts (stmt_vec_info orig_stmt_info, gimple *pattern_stmt,
   if (def_seq)
     for (gimple_stmt_iterator si = gsi_start (def_seq);
         !gsi_end_p (si); gsi_next (&si))
-      vect_init_pattern_stmt (gsi_stmt (si), orig_stmt_info, pattern_vectype);
+      {
+       stmt_vec_info pattern_stmt_info
+         = vect_init_pattern_stmt (gsi_stmt (si),
+                                   orig_stmt_info, pattern_vectype);
+       /* Stmts in the def sequence are not vectorizable cycle or
+          induction defs, instead they should all be vect_internal_def
+          feeding the main pattern stmt which retains this def type.  */
+       STMT_VINFO_DEF_TYPE (pattern_stmt_info) = vect_internal_def;
+      }
 
   if (orig_pattern_stmt)
     {