[COMMITTED] RISC-V/testsuite: add a default march (lacking zfa) to some fp tests
Checks
Commit Message
A bunch of FP tests expecting specific FP asm output fail when built
with zfa because different insns are generated. And this happens
because those tests don't have an explicit -march and the default
used to configure gcc could end up with zfa causing the false fails.
Fix that by adding the -march explicitly which doesn't have zfa.
BTW it seems we have some duplication in tests for zfa and non-zfa and
it would have been better if they were consolidated, but oh well.
gcc/testsuite:
* gcc.target/riscv/fle-ieee.c: Updates dg-options with
explicit -march=rv64gc and -march=rv32gc.
* gcc.target/riscv/fle-snan.c: Ditto.
* gcc.target/riscv/fle.c: Ditto.
* gcc.target/riscv/flef-ieee.c: Ditto.
* gcc.target/riscv/flef.c: Ditto.
* gcc.target/riscv/flef-snan.c: Ditto.
* gcc.target/riscv/flt-ieee.c: Ditto.
* gcc.target/riscv/flt-snan.c: Ditto.
* gcc.target/riscv/fltf-ieee.c: Ditto.
* gcc.target/riscv/fltf-snan.c: Ditto.
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
---
gcc/testsuite/gcc.target/riscv/fle-ieee.c | 3 ++-
gcc/testsuite/gcc.target/riscv/fle-snan.c | 3 ++-
gcc/testsuite/gcc.target/riscv/fle.c | 3 ++-
gcc/testsuite/gcc.target/riscv/flef-ieee.c | 3 ++-
gcc/testsuite/gcc.target/riscv/flef-snan.c | 3 ++-
gcc/testsuite/gcc.target/riscv/flef.c | 3 ++-
gcc/testsuite/gcc.target/riscv/flt-ieee.c | 3 ++-
gcc/testsuite/gcc.target/riscv/flt-snan.c | 3 ++-
gcc/testsuite/gcc.target/riscv/fltf-ieee.c | 3 ++-
gcc/testsuite/gcc.target/riscv/fltf-snan.c | 3 ++-
10 files changed, 20 insertions(+), 10 deletions(-)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */
long
fle (double x, double y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */
long
fle (double x, double y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -fno-trapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv32 } } } */
long
fle (double x, double y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */
long
flef (float x, float y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */
long
flef (float x, float y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -fno-trapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -fno-trapping-math -fno-signaling-nans" { target { rv32 } } } */
long
flef (float x, float y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */
long
flt (double x, double y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */
long
flt (double x, double y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fno-signaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fno-signaling-nans" { target { rv32 } } } */
long
fltf (float x, float y)
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target hard_float } */
-/* { dg-options "-fno-finite-math-only -ftrapping-math -fsignaling-nans" } */
+/* { dg-options "-march=rv64gc -mabi=lp64d -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv64 } } } */
+/* { dg-options "-march=rv32gc -mabi=ilp32f -fno-finite-math-only -ftrapping-math -fsignaling-nans" { target { rv32 } } } */
long
fltf (float x, float y)