Tested on x86_64-linux, darwin, i686-darwin, pushed to trunk, thanks
Iain

--- 8< ---

1. The existing added options overide the ones provided by the
check-function-bodies code leading to fails there.  So make those adds
conditional on not Darwin.

2. Two of the tests require assemble and run support for avx512 featues.
Add requires clauses for these.

gcc/testsuite/ChangeLog:

        * gcc.target/i386/truncsfbf-3.c: Do not override
        asynchronous-unwind-tables on Darwin.
        * gcc.target/i386/truncsfbf-4.c: Likewise.
        * gcc.target/i386/truncsfbf-5.c: Require avxneconvert.
        * gcc.target/i386/truncsfbf-6.c: Require avx512vl.

Signed-off-by: Iain Sandoe <[email protected]>
---
 gcc/testsuite/gcc.target/i386/truncsfbf-3.c | 3 ++-
 gcc/testsuite/gcc.target/i386/truncsfbf-4.c | 3 ++-
 gcc/testsuite/gcc.target/i386/truncsfbf-5.c | 2 +-
 gcc/testsuite/gcc.target/i386/truncsfbf-6.c | 2 +-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/truncsfbf-3.c 
b/gcc/testsuite/gcc.target/i386/truncsfbf-3.c
index afabacbacb6..0612ad4c305 100644
--- a/gcc/testsuite/gcc.target/i386/truncsfbf-3.c
+++ b/gcc/testsuite/gcc.target/i386/truncsfbf-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-msse2 -O2 -ffast-math -mavxneconvert -mno-avx512bf16 
-fno-asynchronous-unwind-tables" } */
+/* { dg-options "-msse2 -O2 -ffast-math -mavxneconvert -mno-avx512bf16" } */
+/* { dg-additional-options "-fno-asynchronous-unwind-tables" { target { ! 
*-*-darwin* } } } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "ia32" "*ia32" "" { target ia32 } 
{^\t?\.} } } */
 /* { dg-final { check-function-bodies "x64" "*x64" "" { target { ! ia32 } } 
{^\t?\.} } } */
diff --git a/gcc/testsuite/gcc.target/i386/truncsfbf-4.c 
b/gcc/testsuite/gcc.target/i386/truncsfbf-4.c
index ea2653f3e90..71e5e168a7b 100644
--- a/gcc/testsuite/gcc.target/i386/truncsfbf-4.c
+++ b/gcc/testsuite/gcc.target/i386/truncsfbf-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-msse2 -O2 -ffast-math -mno-avxneconvert -mavx512vl 
-mavx512bf16 -fno-asynchronous-unwind-tables" } */
+/* { dg-options "-msse2 -O2 -ffast-math -mno-avxneconvert -mavx512vl 
-mavx512bf16" } */
+/* { dg-additional-options "-fno-asynchronous-unwind-tables" { target { ! 
*-*-darwin* } } } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "ia32" "*ia32" "" { target ia32 } 
{^\t?\.} } } */
 /* { dg-final { check-function-bodies "x64" "*x64" "" { target { ! ia32 } } 
{^\t?\.} } } */
diff --git a/gcc/testsuite/gcc.target/i386/truncsfbf-5.c 
b/gcc/testsuite/gcc.target/i386/truncsfbf-5.c
index a2ef701e124..2458c5a6427 100644
--- a/gcc/testsuite/gcc.target/i386/truncsfbf-5.c
+++ b/gcc/testsuite/gcc.target/i386/truncsfbf-5.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -march=x86-64 -save-temps" } */
-
+/* { dg-require-effective-target avxneconvert { target x86_64-*-* i?86-*-* } } 
*/
 #define CHECK_CPU_SUPPORTS __builtin_cpu_supports ("avxneconvert")
 #define ATTRIBUTE __attribute__ ((target("avxneconvert")))
 
diff --git a/gcc/testsuite/gcc.target/i386/truncsfbf-6.c 
b/gcc/testsuite/gcc.target/i386/truncsfbf-6.c
index f8670449269..9468ce040b3 100644
--- a/gcc/testsuite/gcc.target/i386/truncsfbf-6.c
+++ b/gcc/testsuite/gcc.target/i386/truncsfbf-6.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -march=x86-64 -save-temps" } */
-
+/* { dg-require-effective-target avx512vl { target x86_64-*-* i?86-*-* } } */
 #define CHECK_CPU_SUPPORTS (__builtin_cpu_supports ("avx512vl") \
                            && __builtin_cpu_supports ("avx512bf16"))
 #define ATTRIBUTE __attribute__ ((target("avx512vl,avx512bf16")))
-- 
2.50.1 (Apple Git-155)

Reply via email to