diff mbox series

TEST: Add vectorization check

Message ID 20231009145957.51655-1-juzhe.zhong@rivai.ai
State New
Headers show
Series TEST: Add vectorization check | expand

Commit Message

钟居哲 Oct. 9, 2023, 2:59 p.m. UTC
These cases won't check SLP for load_lanes support target.

Add vectorization check for situations.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/pr97832-2.c: Add vectorization check.
	* gcc.dg/vect/pr97832-3.c: Ditto.
	* gcc.dg/vect/pr97832-4.c: Ditto.

---
 gcc/testsuite/gcc.dg/vect/pr97832-2.c | 1 +
 gcc/testsuite/gcc.dg/vect/pr97832-3.c | 1 +
 gcc/testsuite/gcc.dg/vect/pr97832-4.c | 1 +
 3 files changed, 3 insertions(+)

Comments

Jeff Law Oct. 12, 2023, 4:53 p.m. UTC | #1
On 10/9/23 08:59, Juzhe-Zhong wrote:
> These cases won't check SLP for load_lanes support target.
> 
> Add vectorization check for situations.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/vect/pr97832-2.c: Add vectorization check.
> 	* gcc.dg/vect/pr97832-3.c: Ditto.
> 	* gcc.dg/vect/pr97832-4.c: Ditto.
So has this been checked on anything other than riscv?  It would be good 
to know that these aren't likely to introduce new FAILs.

I would think you could build and x86 compiler and just run the vect.exp 
tests with and without this patch (so you don't need to do a full 
regression run).

Assuming it doesn't cause any new x86 FAILs, this is fine for the trunk.

jeff
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-2.c b/gcc/testsuite/gcc.dg/vect/pr97832-2.c
index 7d8d2691432..60e8e8516fc 100644
--- a/gcc/testsuite/gcc.dg/vect/pr97832-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr97832-2.c
@@ -27,3 +27,4 @@  void foo1x1(double* restrict y, const double* restrict x, int clen)
 
 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-3.c b/gcc/testsuite/gcc.dg/vect/pr97832-3.c
index c0603e1432e..2dc76e5b565 100644
--- a/gcc/testsuite/gcc.dg/vect/pr97832-3.c
+++ b/gcc/testsuite/gcc.dg/vect/pr97832-3.c
@@ -48,3 +48,4 @@  void foo(double* restrict y, const double* restrict x0, const double* restrict x
 
 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr97832-4.c b/gcc/testsuite/gcc.dg/vect/pr97832-4.c
index c03442816a4..7e74c9313d5 100644
--- a/gcc/testsuite/gcc.dg/vect/pr97832-4.c
+++ b/gcc/testsuite/gcc.dg/vect/pr97832-4.c
@@ -26,3 +26,4 @@  void foo1x1(double* restrict y, const double* restrict x, int clen)
 
 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
 /* { dg-final { scan-tree-dump "Loop contains only SLP stmts" "vect" { target { ! { vect_load_lanes && vect_strided8 } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */