[v1] LoongArch: testsuite:Fix fail in gen-vect-{2,25}.c file.

Message ID 20240112015224.4476-1-chenxiaolong@loongson.cn
State Accepted
Headers
Series [v1] LoongArch: testsuite:Fix fail in gen-vect-{2,25}.c file. |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

chenxiaolong Jan. 12, 2024, 1:52 a.m. UTC
  1.Delete "dg-do run".
  When binutils do not support vectorization, an error occurs during
the assembly phase that does not recognize vector instructions.

2.Added "-mlsx" option for vectorization on LoongArch.

gcc/testsuite/ChangeLog:

	* gcc.dg/tree-ssa/gen-vect-2.c: Remove the program's default setting
	run state and add the "-mlsx" compilation option for the additional
	LoongArch architecture.
	* gcc.dg/tree-ssa/gen-vect-25.c: Dito.
---
 gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c  | 3 ++-
 gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
index b84f3184427..b83e355e93c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
@@ -1,6 +1,7 @@ 
-/* { dg-do run { target vect_cmdline_needed } } */
+/* { target vect_cmdline_needed } */
 /* { dg-options "-O2 -fno-tree-loop-distribute-patterns -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
 /* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */
 
 #include <stdlib.h>
 
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
index 18fe1aa1502..edbc1dce28f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
@@ -1,6 +1,7 @@ 
-/* { dg-do run { target vect_cmdline_needed } } */
+/* { target vect_cmdline_needed } */
 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
 /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */
 
 #include <stdlib.h>