diff mbox series

[testsuite] Some float64 and float32x test require double64plus.

Message ID a3c90074-f7df-4e0d-8bb0-ea0a3bde6399@gjlay.de
State New
Headers show
Series [testsuite] Some float64 and float32x test require double64plus. | expand

Commit Message

Georg-Johann Lay Oct. 4, 2024, 4:40 p.m. UTC
Some of the float64 and float32x test cases are using double built-ins
and hence require double64plus resp. double_float32xplus, i.e. double
is at least as good as float32x.

This patch adds according dg-require-effective-target filters.
(But only for test cases where I can verify that they are working
with double64+ but are failing with double32.)

Ok for trunk?

Johann

--

testsuite - Some float64 and float32x test require double64plus.

Some of the float64 and float32x test cases are using double built-ins
and hence require double64plus resp. that double is at least as good
as float32x (double_float32xplus).

gcc/testsuite/
	* lib/target-supports.exp (check_effective_target_double_float32xplus):
	New proc.
	* gcc.dg/torture/float32x-builtin.c: Add
	dg-require-effective-target double_float32xplus.
	* gcc.dg/torture/float32x-tg-2.c: Same.
	* gcc.dg/torture/float32x-tg.c: Same.
	* gcc.dg/torture/float64-builtin.c: Add
	dg-require-effective-target double64plus.
	* gcc.dg/torture/float64-tg-2.c: Same.
	* gcc.dg/torture/float64-tg.c: Same.

Comments

Mike Stump Oct. 4, 2024, 5:08 p.m. UTC | #1
On Oct 4, 2024, at 9:40 AM, Georg-Johann Lay <avr@gjlay.de> wrote:
> 
> Some of the float64 and float32x test cases are using double built-ins
> and hence require double64plus resp. double_float32xplus, i.e. double
> is at least as good as float32x.
> 
> This patch adds according dg-require-effective-target filters.
> (But only for test cases where I can verify that they are working
> with double64+ but are failing with double32.)
> 
> Ok for trunk?

Ok.  If you are that domain expert, these sorts of changes are more obvious to you than to me. :-)
diff mbox series

Patch

    testsuite - Some float64 and float32x test require double64plus.
    
    Some of the float64 and float32x test cases are using double built-ins
    and hence require double64plus resp. that double is at least as good
    as float32x (double_float32xplus).
    
    gcc/testsuite/
            * lib/target-supports.exp (check_effective_target_double_float32xplus):
            New proc.
            * gcc.dg/torture/float32x-builtin.c: Add
            dg-require-effective-target double_float32xplus.
            * gcc.dg/torture/float32x-tg-2.c: Same.
            * gcc.dg/torture/float32x-tg.c: Same.
            * gcc.dg/torture/float64-builtin.c: Add
            dg-require-effective-target double64plus.
            * gcc.dg/torture/float64-tg-2.c: Same.
            * gcc.dg/torture/float64-tg.c: Same.

diff --git a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
index 71eb7e2cdc8..0404d392705 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-builtin.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
index 6179aba7cdd..dd7e2064a1a 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-tg-2.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float32x-tg.c b/gcc/testsuite/gcc.dg/torture/float32x-tg.c
index b65b03f558b..87d9bef2b03 100644
--- a/gcc/testsuite/gcc.dg/torture/float32x-tg.c
+++ b/gcc/testsuite/gcc.dg/torture/float32x-tg.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float32x } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float32x_runtime } */
+/* { dg-require-effective-target double_float32xplus } */
 
 #define WIDTH 32
 #define EXT 1
diff --git a/gcc/testsuite/gcc.dg/torture/float64-builtin.c b/gcc/testsuite/gcc.dg/torture/float64-builtin.c
index 413768443ae..2462017e4d5 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-builtin.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-builtin.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
index d0e4316611f..f034e76cfeb 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-tg-2.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/gcc.dg/torture/float64-tg.c b/gcc/testsuite/gcc.dg/torture/float64-tg.c
index a7188312d57..d17ee0ecb19 100644
--- a/gcc/testsuite/gcc.dg/torture/float64-tg.c
+++ b/gcc/testsuite/gcc.dg/torture/float64-tg.c
@@ -4,6 +4,7 @@ 
 /* { dg-add-options float64 } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target float64_runtime } */
+/* { dg-require-effective-target double64plus } */
 
 #define WIDTH 64
 #define EXT 0
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index f92f7f1af9c..459af8e58c6 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3965,6 +3965,17 @@  proc check_effective_target_floatn_nx_runtime {} {
     return 1
 }
 
+# Return 1 when double is at least as good as _Float32x, i.e. double can
+# be used to emulate _Float32x.
+
+proc check_effective_target_double_float32xplus {} {
+    return [check_no_compiler_messages_nocache double_float32xplus object {
+	_Float32x x;
+	int dummy1[__DBL_MANT_DIG__ >= __FLT32X_MANT_DIG__ ? 1 : -1];
+	int dummy2[__DBL_MAX_EXP__ >= __FLT32X_MAX_EXP__ ? 1 : -1];
+    } [add_options_for_float32x ""]]
+}
+
 # Add options needed to use the _FloatN / _FloatNx type indicated in
 # the function name.