tree-optimization/116654 - missed dr_explicit_realign[_optimized] with SLP

Message ID 20241001133335.347C7387086C@sourceware.org
State Committed
Commit e592ea8ddffb44bab52d36d9862bb39ffae4d144
Headers
Series tree-optimization/116654 - missed dr_explicit_realign[_optimized] with SLP |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Test passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Test passed

Commit Message

Richard Biener Oct. 1, 2024, 1:33 p.m. UTC
  With single-lane SLP we miss to use the power realing loads causing
some testsuite FAILs.  r14-2430-g4736ddd11874fe exempted SLP of
non-grouped accesses because that could have been only splats
where the scheme isn't used anyway, but now with single-lane SLP
it can be contiguous accesses.

Bootstrap and regtest running on x86_64-unknown-linux-gnu and
powerpc64le-linux-gnu (might take a while since I have no good
baseline to compare).

Richard.

	PR tree-optimization/116654
	* tree-vect-data-refs.cc (vect_supportable_dr_alignment):
	Treat non-grouped accesses like non-SLP.
---
 gcc/tree-vect-data-refs.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index fe7fdec4ba0..920e3c120a6 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -7170,11 +7170,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)
-	      && (!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))))
+	      && 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