diff mbox series

Do not bother with reassociation in SLP discovery for single-lane

Message ID 20240830104650.29B1813A3D@imap1.dmz-prg2.suse.org
State New
Headers show
Series Do not bother with reassociation in SLP discovery for single-lane | expand

Commit Message

Richard Biener Aug. 30, 2024, 10:46 a.m. UTC
It just clutters the dump files and takes up compile-time.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	* tree-vect-slp.cc (vect_build_slp_tree_2): Disable SLP
	reassociation for single-lane.
---
 gcc/tree-vect-slp.cc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 2aedba61a4e..5a65a99d61e 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -2099,6 +2099,8 @@  vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
      for matching as we can succeed by means of builds from scalars
      and have no good way to "cost" one build against another.  */
   else if (is_a <loop_vec_info> (vinfo)
+	   /* Do not bother for single-lane SLP.  */
+	   && group_size > 1
 	   /* ???  We don't handle !vect_internal_def defs below.  */
 	   && STMT_VINFO_DEF_TYPE (stmt_info) == vect_internal_def
 	   /* ???  Do not associate a reduction, this will wreck REDUC_IDX