[v3] LoongArch: testsuite:Added additional vectorization "-mlsx" option.

Message ID 20240126062231.45060-1-chenxiaolong@loongson.cn
State Accepted
Headers
Series [v3] LoongArch: testsuite:Added additional vectorization "-mlsx" option. |

Checks

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

Commit Message

chenxiaolong Jan. 26, 2024, 6:22 a.m. UTC
  gcc/testsuite/ChangeLog:

	* gcc.dg/signbit-2.c: Added additional "-mlsx" compilation options.
	* gfortran.dg/graphite/vect-pr40979.f90: Dito.
	* gfortran.dg/vect/fast-math-mgrid-resid.f: Dito.
---
 gcc/testsuite/gcc.dg/signbit-2.c                       | 1 +
 gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90    | 1 +
 gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 1 +
 3 files changed, 3 insertions(+)
  

Comments

Richard Biener Jan. 26, 2024, 7:32 a.m. UTC | #1
On Fri, Jan 26, 2024 at 7:23 AM chenxiaolong <chenxiaolong@loongson.cn> wrote:
>
> gcc/testsuite/ChangeLog:

OK

>         * gcc.dg/signbit-2.c: Added additional "-mlsx" compilation options.
>         * gfortran.dg/graphite/vect-pr40979.f90: Dito.
>         * gfortran.dg/vect/fast-math-mgrid-resid.f: Dito.
> ---
>  gcc/testsuite/gcc.dg/signbit-2.c                       | 1 +
>  gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90    | 1 +
>  gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
> index 62bb4047d74..5511bb78149 100644
> --- a/gcc/testsuite/gcc.dg/signbit-2.c
> +++ b/gcc/testsuite/gcc.dg/signbit-2.c
> @@ -5,6 +5,7 @@
>  /* { dg-additional-options "-msse2 -mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
>  /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
>  /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
> +/* { dg-additional-options "-mlsx" { target loongarch_sx } } */
>  /* { dg-skip-if "no fallback for MVE" { arm_mve } } */
>
>  #include <stdint.h>
> diff --git a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
> index a42290948c4..6f2ad1166a4 100644
> --- a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
> +++ b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
> @@ -1,6 +1,7 @@
>  ! { dg-do compile }
>  ! { dg-require-effective-target vect_double }
>  ! { dg-additional-options "-msse2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
> +! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
>
>  module mqc_m
>  integer, parameter, private :: longreal = selected_real_kind(15,90)
> diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
> index 08965cc5e20..97b88821731 100644
> --- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
> +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
> @@ -2,6 +2,7 @@
>  ! { dg-require-effective-target vect_double }
>  ! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" }
>  ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } }
> +! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
>  ! { dg-additional-options "-mzarch" { target { s390*-*-* } } }
>
>  ******* RESID COMPUTES THE RESIDUAL:  R = V - AU
> --
> 2.20.1
>
  
chenglulu Jan. 26, 2024, 8:15 a.m. UTC | #2
在 2024/1/26 下午3:32, Richard Biener 写道:
> On Fri, Jan 26, 2024 at 7:23 AM chenxiaolong <chenxiaolong@loongson.cn> wrote:
>> gcc/testsuite/ChangeLog:
> OK

Pushed to r14-8445.

Thank you everyone for your review!

>
>>          * gcc.dg/signbit-2.c: Added additional "-mlsx" compilation options.
>>          * gfortran.dg/graphite/vect-pr40979.f90: Dito.
>>          * gfortran.dg/vect/fast-math-mgrid-resid.f: Dito.
>> ---
>>   gcc/testsuite/gcc.dg/signbit-2.c                       | 1 +
>>   gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90    | 1 +
>>   gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 1 +
>>   3 files changed, 3 insertions(+)
>>
>> diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
>> index 62bb4047d74..5511bb78149 100644
>> --- a/gcc/testsuite/gcc.dg/signbit-2.c
>> +++ b/gcc/testsuite/gcc.dg/signbit-2.c
>> @@ -5,6 +5,7 @@
>>   /* { dg-additional-options "-msse2 -mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
>>   /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
>>   /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
>> +/* { dg-additional-options "-mlsx" { target loongarch_sx } } */
>>   /* { dg-skip-if "no fallback for MVE" { arm_mve } } */
>>
>>   #include <stdint.h>
>> diff --git a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
>> index a42290948c4..6f2ad1166a4 100644
>> --- a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
>> +++ b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
>> @@ -1,6 +1,7 @@
>>   ! { dg-do compile }
>>   ! { dg-require-effective-target vect_double }
>>   ! { dg-additional-options "-msse2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
>> +! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
>>
>>   module mqc_m
>>   integer, parameter, private :: longreal = selected_real_kind(15,90)
>> diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
>> index 08965cc5e20..97b88821731 100644
>> --- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
>> +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
>> @@ -2,6 +2,7 @@
>>   ! { dg-require-effective-target vect_double }
>>   ! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" }
>>   ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } }
>> +! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
>>   ! { dg-additional-options "-mzarch" { target { s390*-*-* } } }
>>
>>   ******* RESID COMPUTES THE RESIDUAL:  R = V - AU
>> --
>> 2.20.1
>>
  

Patch

diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
index 62bb4047d74..5511bb78149 100644
--- a/gcc/testsuite/gcc.dg/signbit-2.c
+++ b/gcc/testsuite/gcc.dg/signbit-2.c
@@ -5,6 +5,7 @@ 
 /* { dg-additional-options "-msse2 -mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
 /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
 /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
+/* { dg-additional-options "-mlsx" { target loongarch_sx } } */
 /* { dg-skip-if "no fallback for MVE" { arm_mve } } */
 
 #include <stdint.h>
diff --git a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
index a42290948c4..6f2ad1166a4 100644
--- a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90
@@ -1,6 +1,7 @@ 
 ! { dg-do compile }
 ! { dg-require-effective-target vect_double }
 ! { dg-additional-options "-msse2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
+! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
 
 module mqc_m
 integer, parameter, private :: longreal = selected_real_kind(15,90)
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
index 08965cc5e20..97b88821731 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
@@ -2,6 +2,7 @@ 
 ! { dg-require-effective-target vect_double }
 ! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" }
 ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } }
+! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } }
 ! { dg-additional-options "-mzarch" { target { s390*-*-* } } }
 
 ******* RESID COMPUTES THE RESIDUAL:  R = V - AU