public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/rguenth/heads/vect-force-slp)] Allow single-lane SLP of not pattern detected gather/scatter
@ 2023-10-16 12:49 Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-10-16 12:49 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a01f778e3e051f4b87f167a71abcc1fef878c7ef

commit a01f778e3e051f4b87f167a71abcc1fef878c7ef
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Sep 29 13:02:23 2023 +0200

    Allow single-lane SLP of not pattern detected gather/scatter
    
    The following allows to form single-lane SLP graphs from gathers
    and scatters that were not turned into the internal function
    representation by pattern matching.  That should help both x86
    and emulated gather/scatter to survive single-lane SLP build.
    
            * tree-vect-slp.cc (vect_build_slp_tree_1): Allow single-lane
            gather/scatter.

Diff:
---
 gcc/tree-vect-slp.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index ef3a105cfaf4..97bd2f3feea2 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -1360,7 +1360,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 		 splats the same we handle single element interleaving.  */
 	      && (is_a <bb_vec_info> (vinfo)
 		  || stmt_info != first_stmt_info
-		  || STMT_VINFO_GATHER_SCATTER_P (stmt_info)))
+		  || (STMT_VINFO_GATHER_SCATTER_P (stmt_info) && i != 0)))
 	    {
 	      /* Not grouped load.  */
 	      if (dump_enabled_p ())
@@ -1861,6 +1861,8 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
 	gcc_assert (gimple_call_internal_p (stmt, IFN_MASK_LOAD)
 		    || gimple_call_internal_p (stmt, IFN_GATHER_LOAD)
 		    || gimple_call_internal_p (stmt, IFN_MASK_GATHER_LOAD));
+      else if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+	;
       else
 	{
 	  *max_nunits = this_max_nunits;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/users/rguenth/heads/vect-force-slp)] Allow single-lane SLP of not pattern detected gather/scatter
@ 2023-10-06  7:07 Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-10-06  7:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2caa6562a18d0af2d953261d5d0dc3ea428c4959

commit 2caa6562a18d0af2d953261d5d0dc3ea428c4959
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Sep 29 13:02:23 2023 +0200

    Allow single-lane SLP of not pattern detected gather/scatter
    
    The following allows to form single-lane SLP graphs from gathers
    and scatters that were not turned into the internal function
    representation by pattern matching.  That should help both x86
    and emulated gather/scatter to survive single-lane SLP build.
    
            * tree-vect-slp.cc (vect_build_slp_tree_1): Allow single-lane
            gather/scatter.

Diff:
---
 gcc/tree-vect-slp.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 41b5626cbe5..281938c6aa1 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -1342,7 +1342,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 		 splats the same we handle single element interleaving.  */
 	      && (is_a <bb_vec_info> (vinfo)
 		  || stmt_info != first_stmt_info
-		  || STMT_VINFO_GATHER_SCATTER_P (stmt_info)))
+		  || (STMT_VINFO_GATHER_SCATTER_P (stmt_info) && i != 0)))
 	    {
 	      /* Not grouped load.  */
 	      if (dump_enabled_p ())
@@ -1843,6 +1843,8 @@ vect_build_slp_tree_2 (vec_info *vinfo, slp_tree node,
 	gcc_assert (gimple_call_internal_p (stmt, IFN_MASK_LOAD)
 		    || gimple_call_internal_p (stmt, IFN_GATHER_LOAD)
 		    || gimple_call_internal_p (stmt, IFN_MASK_GATHER_LOAD));
+      else if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+	;
       else
 	{
 	  *max_nunits = this_max_nunits;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-16 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-16 12:49 [gcc(refs/users/rguenth/heads/vect-force-slp)] Allow single-lane SLP of not pattern detected gather/scatter Richard Biener
  -- strict thread matches above, loose matches on Subject: below --
2023-10-06  7:07 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).