https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99746

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'm testing the following:

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index f1a2b5d60fa..762cba54bb5 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -3770,6 +3770,20 @@ vect_slp_analyze_node_operations_1 (vec_info *vinfo,
slp_tree node,
       return false;
     }

+  /* ???  We're getting confused with pattern marking since the loop
+     vect part would need to use the original scalar stmts but we've
+     registered the SLP pattern as pattern stmt for those which isn't
+     technically correct.  Give up for now.  */
+  if (STMT_VINFO_SLP_VECT_ONLY_PATTERN (stmt_info)
+      && HYBRID_SLP_STMT (stmt_info))
+    {
+      if (dump_enabled_p ())
+       dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+                        "cannot do hybrid SLP on SLP pattern "
+                        "stmt %G", stmt_info->stmt);
+      return false;
+    }
+
   bool dummy;
   return vect_analyze_stmt (vinfo, stmt_info, &dummy,
                            node, node_instance, cost_vec);

Reply via email to