]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-optimization/110614 - SLP splat and re-align (optimized)
authorRichard Biener <rguenther@suse.de>
Tue, 11 Jul 2023 08:40:19 +0000 (10:40 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 11 Jul 2023 10:22:35 +0000 (12:22 +0200)
The following properly guards the re-align (optimized) paths used
on old power CPUs for the added case of SLP splats from non-grouped
loads.  Testcases are existing in dg-torture.

PR tree-optimization/110614
* tree-vect-data-refs.cc (vect_supportable_dr_alignment):
SLP splats are not suitable for re-align ops.

gcc/tree-vect-data-refs.cc

index ab2af103cb4ae854630b5660572ca376c2a5fbb5..9edc8989de9559ee2b1b967968490047532e6204 100644 (file)
@@ -6829,10 +6829,11 @@ vect_supportable_dr_alignment (vec_info *vinfo, dr_vec_info *dr_info,
             same alignment, instead it depends on the SLP group size.  */
          if (loop_vinfo
              && STMT_SLP_TYPE (stmt_info)
-             && !multiple_p (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
-                             * (DR_GROUP_SIZE
-                                (DR_GROUP_FIRST_ELEMENT (stmt_info))),
-                             TYPE_VECTOR_SUBPARTS (vectype)))
+             && (!STMT_VINFO_GROUPED_ACCESS (stmt_info)
+                 || !multiple_p (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+                                 * (DR_GROUP_SIZE
+                                      (DR_GROUP_FIRST_ELEMENT (stmt_info))),
+                                 TYPE_VECTOR_SUBPARTS (vectype))))
            ;
          else if (!loop_vinfo
                   || (nested_in_vect_loop