public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Add check_vect in a testcase
@ 2023-07-26 15:58 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2023-07-26 15:58 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

Also reformat a comment that had too long lines.
Commit c5bd0e5870a introduced both these problems to fix.

Committed as obvious after ensuring that when running the testcase on
AArch64 it still fails before the original c5bd0e5870a commit and passes
after it.

gcc/ChangeLog:

	* tree-vect-stmts.cc (get_group_load_store_type): Reformat
	comment.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/vect-multi-peel-gaps.c: Add `check_vect` call into
	`main` of this testcase.



###############     Attachment also inlined for ease of reply    ###############


diff --git a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
index 1aab4c5a14d1e8346d89587bd9544a1516535a45..7e7db3c7a45fa1ecc748f51353170ec66c5dfed7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
@@ -9,6 +9,7 @@
 /* { dg-require-effective-target mmap } */
 #include <sys/mman.h>
 #include <stdio.h>
+#include "tree-vect.h"
 
 #define MMAP_SIZE 0x20000
 #define ADDRESS 0x1122000000
@@ -24,6 +25,7 @@ void initialise_s(int *s) { }
 int main() {
     void *s_mapping;
     void *end_s;
+    check_vect ();
     s_mapping = mmap ((void *)ADDRESS, MMAP_SIZE, PROT_READ | PROT_WRITE,
 		      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
     if (s_mapping == MAP_FAILED)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 99e61f8a85dc6cebbb3cd4183f8bd7fdfe9aa1de..5018bd23e6ec457a8e4790d333752b7e009228e0 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -2214,8 +2214,9 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
 	     we can end up with no gap recorded but still excess
 	     elements accessed, see PR103116.  Make sure we peel for
 	     gaps if necessary and sufficient and give up if not.
-	     If there is a combination of the access not covering the full vector and
-	     a gap recorded then we may need to peel twice.  */
+
+	     If there is a combination of the access not covering the full
+	     vector and a gap recorded then we may need to peel twice.  */
 	  if (loop_vinfo
 	      && *memory_access_type == VMAT_CONTIGUOUS
 	      && SLP_TREE_LOAD_PERMUTATION (slp_node).exists ()




[-- Attachment #2: vect-patch-update.patch --]
[-- Type: text/plain, Size: 1678 bytes --]

diff --git a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
index 1aab4c5a14d1e8346d89587bd9544a1516535a45..7e7db3c7a45fa1ecc748f51353170ec66c5dfed7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c
@@ -9,6 +9,7 @@
 /* { dg-require-effective-target mmap } */
 #include <sys/mman.h>
 #include <stdio.h>
+#include "tree-vect.h"
 
 #define MMAP_SIZE 0x20000
 #define ADDRESS 0x1122000000
@@ -24,6 +25,7 @@ void initialise_s(int *s) { }
 int main() {
     void *s_mapping;
     void *end_s;
+    check_vect ();
     s_mapping = mmap ((void *)ADDRESS, MMAP_SIZE, PROT_READ | PROT_WRITE,
 		      MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
     if (s_mapping == MAP_FAILED)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 99e61f8a85dc6cebbb3cd4183f8bd7fdfe9aa1de..5018bd23e6ec457a8e4790d333752b7e009228e0 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -2214,8 +2214,9 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
 	     we can end up with no gap recorded but still excess
 	     elements accessed, see PR103116.  Make sure we peel for
 	     gaps if necessary and sufficient and give up if not.
-	     If there is a combination of the access not covering the full vector and
-	     a gap recorded then we may need to peel twice.  */
+
+	     If there is a combination of the access not covering the full
+	     vector and a gap recorded then we may need to peel twice.  */
 	  if (loop_vinfo
 	      && *memory_access_type == VMAT_CONTIGUOUS
 	      && SLP_TREE_LOAD_PERMUTATION (slp_node).exists ()




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 15:58 [committed] Add check_vect in a testcase Matthew Malcomson

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).