From 7b8f4c85051501e9c804df2de1a08f11aa187e9d Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Tue, 24 Jan 2023 08:48:11 +0100 Subject: [PATCH] testsuite: Fix gcc.dg/vect/vect-fmax-1.c etc. on SPARC [PR104756] The gcc.dg/vect/vect-fmax-?.c etc. tests FAIL on 32 and 64-bit SPARC: FAIL: gcc.dg/vect/vect-fmax-1.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmax-1.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmax-2.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmax-2.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmax-3.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmax-3.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-1.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-1.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-1.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-1.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-2.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-2.c scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-3.c -flto -ffat-lto-objects scan-tree-dump vect "Detected reduction" FAIL: gcc.dg/vect/vect-fmin-3.c scan-tree-dump vect "Detected reduction" As discussed in the PR, they require vect_float support, but the tests don't declare it. This patch fixes this. Tested on sparc-sun-solaris2.11 and i386-pc-solaris2.11. 2023-01-20 Rainer Orth gcc/testsuite: PR testsuite/104756 * gcc.dg/vect/vect-fmax-1.c: Require vect_float. * gcc.dg/vect/vect-fmax-2.c: Likewise. * gcc.dg/vect/vect-fmax-3.c: Likewise. * gcc.dg/vect/vect-fmin-1.c: Likewise. * gcc.dg/vect/vect-fmin-2.c: Likewise. * gcc.dg/vect/vect-fmin-3.c: Likewise. --- gcc/testsuite/gcc.dg/vect/vect-fmax-1.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-fmax-2.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-fmax-3.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-fmin-1.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-fmin-2.c | 2 ++ gcc/testsuite/gcc.dg/vect/vect-fmin-3.c | 2 ++ 6 files changed, 12 insertions(+) diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c index 841ffab..d3aa5b0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #include "tree-vect.h" #ifndef TYPE diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c index 3d1f644..d455dd4 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-2.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #define TYPE double #define FN __builtin_fmax diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c index f711ed0..58e74e2 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmax-3.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #include "tree-vect.h" void __attribute__((noipa)) diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c index 3d5f843..281fdf2 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #include "tree-vect.h" #ifndef TYPE diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c index 21e45cc..ee9e134 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-2.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #ifndef TYPE #define TYPE double #define FN __builtin_fmin diff --git a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c index cc38bf4..2e282ba 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c +++ b/gcc/testsuite/gcc.dg/vect/vect-fmin-3.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target vect_float } */ + #include "tree-vect.h" void __attribute__((noipa)) -- 2.7.4