[PATCH] IBM Z: Do not run long double tests on old machines

Ilya Leoshkevich iii@linux.ibm.com
Fri Nov 13 22:23:19 GMT 2020


Bootstrapped and regtested on z13 s390x-redhat-linux.  Ok for master?

gcc/testsuite/ChangeLog:

2020-11-12  Ilya Leoshkevich  <iii@linux.ibm.com>

	* gcc.target/s390/s390.exp (check_effective_target_s390_z14_hw):
	New predicate.
	* gcc.target/s390/vector/long-double-caller-abi-run.c: Use the
	new predicate.
	* gcc.target/s390/vector/long-double-copysign.c: Likewise.
	* gcc.target/s390/vector/long-double-from-double.c: Likewise.
	* gcc.target/s390/vector/long-double-from-float.c: Likewise.
	* gcc.target/s390/vector/long-double-from-i16.c: Likewise.
	* gcc.target/s390/vector/long-double-from-i32.c: Likewise.
	* gcc.target/s390/vector/long-double-from-i64.c: Likewise.
	* gcc.target/s390/vector/long-double-from-i8.c: Likewise.
	* gcc.target/s390/vector/long-double-from-u16.c: Likewise.
	* gcc.target/s390/vector/long-double-from-u32.c: Likewise.
	* gcc.target/s390/vector/long-double-from-u64.c: Likewise.
	* gcc.target/s390/vector/long-double-from-u8.c: Likewise.
	* gcc.target/s390/vector/long-double-to-double.c: Likewise.
	* gcc.target/s390/vector/long-double-to-float.c: Likewise.
	* gcc.target/s390/vector/long-double-to-i16.c: Likewise.
	* gcc.target/s390/vector/long-double-to-i32.c: Likewise.
	* gcc.target/s390/vector/long-double-to-i64.c: Likewise.
	* gcc.target/s390/vector/long-double-to-i8.c: Likewise.
	* gcc.target/s390/vector/long-double-to-u16.c: Likewise.
	* gcc.target/s390/vector/long-double-to-u32.c: Likewise.
	* gcc.target/s390/vector/long-double-to-u64.c: Likewise.
	* gcc.target/s390/vector/long-double-to-u8.c: Likewise.
	* gcc.target/s390/vector/long-double-wfaxb.c: Likewise.
	* gcc.target/s390/vector/long-double-wfdxb.c: Likewise.
	* gcc.target/s390/vector/long-double-wfsxb-1.c: Likewise.
---
 gcc/testsuite/gcc.target/s390/s390.exp                 | 10 ++++++++++
 .../s390/vector/long-double-caller-abi-run.c           |  3 ++-
 .../gcc.target/s390/vector/long-double-copysign.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-double.c   |  3 ++-
 .../gcc.target/s390/vector/long-double-from-float.c    |  3 ++-
 .../gcc.target/s390/vector/long-double-from-i16.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-i32.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-i64.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-i8.c       |  3 ++-
 .../gcc.target/s390/vector/long-double-from-u16.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-u32.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-u64.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-from-u8.c       |  3 ++-
 .../gcc.target/s390/vector/long-double-to-double.c     |  3 ++-
 .../gcc.target/s390/vector/long-double-to-float.c      |  3 ++-
 .../gcc.target/s390/vector/long-double-to-i16.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-i32.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-i64.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-i8.c         |  3 ++-
 .../gcc.target/s390/vector/long-double-to-u16.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-u32.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-u64.c        |  3 ++-
 .../gcc.target/s390/vector/long-double-to-u8.c         |  3 ++-
 .../gcc.target/s390/vector/long-double-wfaxb.c         |  3 ++-
 .../gcc.target/s390/vector/long-double-wfdxb.c         |  3 ++-
 .../gcc.target/s390/vector/long-double-wfsxb-1.c       |  3 ++-
 26 files changed, 60 insertions(+), 25 deletions(-)

diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index 387a720b8e3..00e0555d55c 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -192,6 +192,16 @@ proc check_effective_target_s390_z13_hw { } {
 	}
     }] "-march=z13 -m64 -mzarch" ] } { return 0 } else { return 1 }
 }
+proc check_effective_target_s390_z14_hw { } {
+    if { ![check_runtime s390_check_s390_z14_hw [subst {
+	int main (void)
+	{
+	    int x = 0;
+	    asm ("msgrkc %%0,%%0,%%0" : "+r" (x) : );
+	    return x;
+	}
+    }] "-march=z14 -m64 -mzarch" ] } { return 0 } else { return 1 }
+}
 
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c b/gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c
index f3a41bacc2f..f7315f6c2e9 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include "long-double-callee-abi-scan.c"
 #include "long-double-caller-abi-scan.c"
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c b/gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c
index 3115195e974..5d69e0f29ed 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c
index 5eb31f8bd84..d98e44dcd1f 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c
index 0449f0cfaf2..0ddd47d1bc8 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c
index 68b164d377f..f7d37c9a55f 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c
index ad8443bf61a..49d919d87f4 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c
index 3d2c424bbc7..986a5ebea38 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c
index 44c8c9d9bec..9356af1ae41 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c
index f10c298c6d0..3aafeb456f5 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c
index 2763fb47b55..655f5d721c7 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c
index 4686dfd8d20..601ff9c0f81 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c
index 3e6eb924244..a43b4c80f99 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c
index 88aa053d203..71ed8b2cdb3 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static double
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c
index 36fd4299ae4..a2855e06cca 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static float
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c
index ddfc668f0d6..1dd0e814db9 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c
index 975a5deff8f..0d5678b3ad1 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c
index 6bd5079ae97..2dbbb5d1c03 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c
index 46e6d6bdf3c..9b0b45d9873 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c
index 0690f3df1e3..f9ad0c68f4b 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c
index aa0e318f299..37b0616312b 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c
index e37b65ef6f8..051934daadf 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c
index bddbff8bf69..cf3204cc95c 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c b/gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c
index 1b35c1c5dd5..5a10bd1e2bc 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c b/gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c
index 16b48938ebd..db517e98907 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c b/gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c
index 20960d05e0c..06750a674f3 100644
--- a/gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c
+++ b/gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 typedef float tf __attribute__ ((mode (TF)));
-- 
2.25.4



More information about the Gcc-patches mailing list