RISC-V: Remove unnecessary option for scalar SAT_TRUNC testcase

After we create a isolated folder to hold all SAT scalar test,
we have fully control of what optimization options passing to
the testcase.  Thus, it is better to remove the unnecessary
work around for flto option, as well as the -O3 option for
each cases.  The riscv.exp will pass sorts of different optimization
options for each case.

The below test suites are passed for this patch.
* The rv64gcv fully regression test.

It is test only patch and obvious up to a point, will commit it
directly if no comments in next 48H.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/sat/sat_u_trunc-1-u16.c: Remove flto
	dg-skip workaround and -O3 option.
	* gcc.target/riscv/sat/sat_u_trunc-1-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-1-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-1-u8.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-2-u16.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-2-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-2-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-2-u8.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-3-u16.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-3-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-3-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-3-u8.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-4-u16.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-4-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-4-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-4-u8.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-5-u16.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-5-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-5-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-5-u8.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-6-u16.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-6-u32.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-6-u64.c: Ditto.
	* gcc.target/riscv/sat/sat_u_trunc-6-u8.c: Ditto.
	* gcc.target/riscv/sat/scalar_sat_unary.h: New test.

Signed-off-by: Pan Li <pan2.li@intel.com>
This commit is contained in:
Pan Li 2024-11-16 10:43:37 +08:00
parent 5751614add
commit 75034a77dc
25 changed files with 46 additions and 48 deletions

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } } */
/* { dg-options "-march=rv64gc -mabi=lp64d -O3 -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-rtl-expand-details -fno-schedule-insns -fno-schedule-insns2" } */
/* { dg-final { check-function-bodies "**" "" } } */
#include "sat_arith.h"

View File

@ -0,0 +1,22 @@
#ifndef HAVE_DEFINED_SCALAR_SAT_UNARY
#define HAVE_DEFINED_SCALAR_SAT_UNARY
int
main ()
{
unsigned i;
T d;
for (i = 0; i < sizeof (DATA) / sizeof (DATA[0]); i++)
{
d = DATA[i];
if (RUN_UNARY (d.from) != d.to)
__builtin_abort ();
}
return 0;
}
#endif