This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/68707] [6 Regression] testcase gcc.dg/vect/O3-pr36098.c vectorized using VEC_PERM_EXPR rather than VEC_LOAD_LANES


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

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
So explicit like

+      /* If the loads and stores can be handled with load/store-lane
+         instructions do not generate this SLP instance.  */
+      if (is_a <loop_vec_info> (vinfo)
+         && loads_permuted
+         && dr && vect_store_lanes_supported (vectype, group_size))
+       {
+         slp_tree load_node;
+         FOR_EACH_VEC_ELT (loads, i, load_node)
+           {
+             gimple *first_stmt = GROUP_FIRST_ELEMENT
+                 (vinfo_for_stmt (SLP_TREE_SCALAR_STMTS (load_node)[0]));
+             stmt_vec_info stmt_vinfo = vinfo_for_stmt (first_stmt);
+             if (STMT_VINFO_STRIDED_P (stmt_vinfo)
+                 || ! vect_load_lanes_supported
+                        (STMT_VINFO_VECTYPE (stmt_vinfo),
+                         GROUP_SIZE (stmt_vinfo)))
+               break;

for example, keeping the SLP in the case one load is strided.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]