From d74aed3d7aefbb661ae629a91ca7baa4916085f0 Mon Sep 17 00:00:00 2001 From: Matthew Malcomson <matthew.malcomson@arm.com> Date: Wed, 26 Jul 2023 16:53:18 +0100 Subject: [PATCH] [committed] Add check_vect in a testcase 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. --- gcc/testsuite/gcc.dg/vect/vect-multi-peel-gaps.c | 2 ++ gcc/tree-vect-stmts.cc | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 1aab4c5a14d1..7e7db3c7a45f 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 99e61f8a85dc..5018bd23e6ec 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 () -- GitLab