]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix gcc.dg/vect/vect-early-break_39.c FAIL with forced SLP
authorRichard Biener <rguenther@suse.de>
Wed, 16 Oct 2024 09:37:31 +0000 (11:37 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 17 Oct 2024 06:48:38 +0000 (08:48 +0200)
The testcases shows single-element interleaving of size three
being exempted from permutation lowering via heuristics
(see also PR116973).  But it wasn't supposed to apply to
non-power-of-two sizes so this amends the check to ensure
the sub-group is aligned even when the number of lanes is one.

* tree-vect-slp.cc (vect_lower_load_permutations): Avoid
exempting non-power-of-two group sizes from lowering.

gcc/tree-vect-slp.cc

index 629c4b433ab5559bf5b57a3d91d76d3532d42ffb..d35c2ea02dcef1c295bf97adc6717a7294d3f61e 100644 (file)
@@ -4427,6 +4427,7 @@ vect_lower_load_permutations (loop_vec_info loop_vinfo,
          && contiguous
          && (SLP_TREE_LANES (load) > 1 || loads.size () == 1)
          && pow2p_hwi (SLP_TREE_LANES (load))
+         && pow2p_hwi (group_lanes)
          && SLP_TREE_LOAD_PERMUTATION (load)[0] % SLP_TREE_LANES (load) == 0
          && group_lanes % SLP_TREE_LANES (load) == 0)
        {