]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/117554 - correct single-element interleaving check
authorRichard Biener <rguenther@suse.de>
Wed, 13 Nov 2024 14:05:00 +0000 (15:05 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 14 Nov 2024 08:24:53 +0000 (09:24 +0100)
In addition to a single DR we also require a single lane, not a splat.

PR tree-optimization/117554
* tree-vect-stmts.cc (get_group_load_store_type): We can
use gather/scatter only for a single-lane single element group
access.

gcc/tree-vect-stmts.cc

index 2b3dd52a607d6e294418e04b804bd94fff7b848a..3147ff247a54458e9ec4ad0d4081694ce60947e6 100644 (file)
@@ -2277,6 +2277,7 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
   if ((*memory_access_type == VMAT_ELEMENTWISE
        || *memory_access_type == VMAT_STRIDED_SLP)
       && single_element_p
+      && (!slp_node || SLP_TREE_LANES (slp_node) == 1)
       && loop_vinfo
       && vect_use_strided_gather_scatters_p (stmt_info, loop_vinfo,
                                             masked_p, gs_info))