LoongArch: testsuite:Added additional vectorization "-mlasx" compilation option.

In the LoongArch architecture, the reason for not adding the 128-bit
vector-width-*hi* instruction template in the GCC back end is that it causes
program performance loss, so we can only add the "-mlasx" compilation option
to use 256-bit vectorization functions in test files.

gcc/testsuite/ChangeLog:

	* gcc.dg/vect/bb-slp-pattern-1.c: If you are testing on the
	LoongArch architecture, you need to add the "-mlasx" compilation
	option to generate vectorized code.
	* gcc.dg/vect/slp-widen-mult-half.c: Dito.
	* gcc.dg/vect/vect-widen-mult-const-s16.c: Dito.
	* gcc.dg/vect/vect-widen-mult-const-u16.c: Dito.
	* gcc.dg/vect/vect-widen-mult-half-u8.c: Dito.
	* gcc.dg/vect/vect-widen-mult-half.c: Dito.
	* gcc.dg/vect/vect-widen-mult-u16.c: Dito.
	* gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Dito.
	* gcc.dg/vect/vect-widen-mult-u8-u32.c: Dito.
	* gcc.dg/vect/vect-widen-mult-u8.c: Dito.
This commit is contained in:
chenxiaolong 2024-01-05 11:43:28 +08:00 committed by Lulu Cheng
parent 70069fd24b
commit b2de0b84c5
10 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"

View file

@ -1,6 +1,7 @@
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */
#include "tree-vect.h"

View file

@ -2,6 +2,7 @@
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-fno-ipa-icf" } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include "tree-vect.h"

View file

@ -2,6 +2,7 @@
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-fno-ipa-icf" } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include "tree-vect.h"

View file

@ -2,6 +2,7 @@
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-fno-ipa-icf" } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include "tree-vect.h"

View file

@ -1,6 +1,7 @@
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include "tree-vect.h"

View file

@ -1,6 +1,7 @@
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include <stdarg.h>
#include "tree-vect.h"

View file

@ -1,6 +1,7 @@
/* Disabling epilogues until we find a better way to deal with scans. */
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include <stdarg.h>
#include "tree-vect.h"

View file

@ -1,5 +1,6 @@
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */
#include <stdarg.h>
#include "tree-vect.h"

View file

@ -1,5 +1,6 @@
/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
/* { dg-require-effective-target vect_int } */
/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */
#include <stdarg.h>
#include "tree-vect.h"