diff mbox series

Fix gcc.dg/vect/vect-early-break_39.c FAIL with forced SLP

Message ID 20241016094136.B24AD3858433@sourceware.org
State New
Headers show
Series Fix gcc.dg/vect/vect-early-break_39.c FAIL with forced SLP | expand

Commit Message

Richard Biener Oct. 16, 2024, 9:41 a.m. UTC
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.

Bootstrap and regtest running on x86_64-unknown-linux-gnu.

	* tree-vect-slp.cc (vect_lower_load_permutations): Avoid
	exempting non-power-of-two group sizes from lowering.
---
 gcc/tree-vect-slp.cc | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 629c4b433ab..d35c2ea02dc 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -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)
 	{