]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/117605 - SLP with large negative single-element interleaving
authorRichard Biener <rguenther@suse.de>
Fri, 15 Nov 2024 08:22:37 +0000 (09:22 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 16 Nov 2024 13:13:28 +0000 (14:13 +0100)
We fail to demote this to VMAT_ELEMENTWISE and thus run into the three
vector permutation limit (and would not consider to use strided loads
or gathers).

This resolves another bunch of SVE regressions with --param
vect-force-slp=1

PR tree-optimization/117605
* tree-vect-stmts.cc (get_group_load_store_type): Also
apply group size limit for single-element interleaving
to VMAT_CONTIGUOUS_REVERSE.

gcc/tree-vect-stmts.cc

index f4a4d5a554c224c129526ee8a360ee5337b84a60..ab5ea038d1d489f5757935d5fb41d9c6f3b4e8b1 100644 (file)
@@ -2086,8 +2086,9 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
             at least create very sub-optimal code in that case (and
             blow up memory, see PR65518).  */
          if (loop_vinfo
-             && *memory_access_type == VMAT_CONTIGUOUS
              && single_element_p
+             && (*memory_access_type == VMAT_CONTIGUOUS
+                 || *memory_access_type == VMAT_CONTIGUOUS_REVERSE)
              && maybe_gt (group_size, TYPE_VECTOR_SUBPARTS (vectype)))
            {
              if (SLP_TREE_LANES (slp_node) == 1)