https://gcc.gnu.org/g:fc0a5c0d04a55429868594403f96608f7003aed4
commit r17-3964-gfc0a5c0d04a55429868594403f96608f7003aed4 Author: Iain Sandoe <[email protected]> Date: Sun Sep 6 00:32:34 2026 +0100 testsuite, x86, Darwin: Adjust trunksfbf tests for Mach-o. 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]> Diff: --- 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 afabacbacb69..0612ad4c3053 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 ea2653f3e907..71e5e168a7b6 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 a2ef701e1244..2458c5a6427f 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 f8670449269a..9468ce040b3c 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")))
