]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not bother with reassociation in SLP discovery for single-lane
authorRichard Biener <rguenther@suse.de>
Fri, 30 Aug 2024 09:39:53 +0000 (11:39 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 30 Aug 2024 10:47:12 +0000 (12:47 +0200)
It just clutters the dump files and takes up compile-time.

* tree-vect-slp.cc (vect_build_slp_tree_2): Disable SLP
reassociation for single-lane.

gcc/tree-vect-slp.cc

index cfdf59ad3860960b8ada2188a07029007cb1eecf..621ebf670c77b4228253c94551d1133abed4d25d 100644 (file)
@@ -2082,6 +2082,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