From: Pan Li <pan2...@intel.com>

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...@intel.com>
---
 .../gcc.target/riscv/sat/sat_u_trunc-1-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-1-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-1-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-1-u8.c   |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-2-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-2-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-2-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-2-u8.c   |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-3-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-3-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-3-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-3-u8.c   |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-4-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-4-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-4-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-4-u8.c   |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-5-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-5-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-5-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-5-u8.c   |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-6-u16.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-6-u32.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-6-u64.c  |  3 +--
 .../gcc.target/riscv/sat/sat_u_trunc-6-u8.c   |  3 +--
 .../gcc.target/riscv/sat/scalar_sat_unary.h   | 22 +++++++++++++++++++
 25 files changed, 46 insertions(+), 48 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/riscv/sat/scalar_sat_unary.h

diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u16.c
index 1c4b2c7abf2..995abc9a18e 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u32.c
index ee7140e6b2a..048b4b1c715 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u64.c
index 179decb79f6..8c286f54b0b 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u8.c
index e7412263895..c8648af61ab 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-1-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u16.c
index d7ec3a89eea..fe5e3a85d03 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u32.c
index afa3d068f94..618e570e9e4 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u64.c
index f1fb58233bf..c961b5afd20 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u8.c
index e637e5e5ef7..382ddf78755 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-2-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u16.c
index 7619f025e53..9de595da804 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u32.c
index c95d5946ceb..c99b3546c10 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u64.c
index 1acf74d0479..e99b1df095f 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u8.c
index 9e3b06b4407..f0f3219b3b4 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-3-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u16.c
index e124e5bd6ce..b63bd490621 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u32.c
index f79b570147d..6e9837f403f 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u64.c
index e5de5efc10a..3e1327e8b07 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u8.c
index 0af1711cb93..4ef705d705c 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-4-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u16.c
index 2e82133b06f..5ab5b600530 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u32.c
index 75f3d0cfbae..79143a5d705 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u64.c
index c9fcc8ad150..57f0acd1cec 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u8.c
index 0ad4c31fa0e..ec3fe7254a9 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-5-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u16.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u16.c
index 7e07a801009..be5adb45e66 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u16.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u16.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u32.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u32.c
index cc86a9f11d7..95d4c32ad00 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u32.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u32.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u64.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u64.c
index a7d288ebb18..32a76afb9d8 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u64.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u64.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u8.c 
b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u8.c
index 0ae6845d798..953743a5b4d 100644
--- a/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u8.c
+++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_trunc-6-u8.c
@@ -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"
diff --git a/gcc/testsuite/gcc.target/riscv/sat/scalar_sat_unary.h 
b/gcc/testsuite/gcc.target/riscv/sat/scalar_sat_unary.h
new file mode 100644
index 00000000000..2ae058724b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/sat/scalar_sat_unary.h
@@ -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
+
-- 
2.43.0

Reply via email to