From 07545fbd2dfa2351218a5be6488dc5067258d980 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 26 Aug 2020 17:12:07 -0600 Subject: [PATCH] Mark various tests that require a c99 libm A number of i386 math optimisation tests are looking assembly instructions that are only emitted when the compiler knows the target has a C99 libm available. Since targets like *-elf may not have such a libm, a C99 runtime requirement is added to these tests. gcc/testsuite/ChangeLog * gcc.target/i386/387-7.c: Add dg-require-effective-target c99_runtime. * gcc.target/i386/387-9.c: Likewise. * g++.target/i386/avx512bw-pr96246-1.C: Likewise. * gcc.target/i386/avx512f-rint-sfix-vec-2.c: Likewise. * gcc.target/i386/avx512f-rintf-sfix-vec-2.c: Likewise. * g++.target/i386/avx512vl-pr96246-1.C: Likewise. * gcc.target/i386/pr61403.c: Likewise. * gcc.target/i386/sse4_1-ceil-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-floor-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-floorf-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-rint-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-rintf-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-round-sfix-vec.c: Likewise. * gcc.target/i386/sse4_1-roundf-sfix-vec.c: Likewise. --- gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C | 1 + gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C | 1 + gcc/testsuite/gcc.target/i386/387-7.c | 1 + gcc/testsuite/gcc.target/i386/387-9.c | 1 + gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c | 1 + gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c | 1 + gcc/testsuite/gcc.target/i386/pr61403.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c | 1 + gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c | 1 + 15 files changed, 15 insertions(+) diff --git a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C index eec844460f1..1577c9e33bf 100644 --- a/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C +++ b/gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C @@ -1,6 +1,7 @@ /* PR target/96246 */ /* { dg-do compile } */ /* { dg-options "-O2 -std=c++14 -mavx512bw" } */ +/* { dg-require-effective-target c99_runtime } */ /* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t \]" 4 } } */ /* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t \]" 2 } } */ diff --git a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C index 66eb9d25f1e..66861f40d08 100644 --- a/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C +++ b/gcc/testsuite/g++.target/i386/avx512vl-pr96246-1.C @@ -1,6 +1,7 @@ /* PR target/96246 */ /* { dg-do compile } */ /* { dg-options "-O2 -std=c++14 -mavx512bw -mavx512vl" } */ +/* { dg-require-effective-target c99_runtime } */ /* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t \]" 6 } } */ /* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t \]" 3 } } */ diff --git a/gcc/testsuite/gcc.target/i386/387-7.c b/gcc/testsuite/gcc.target/i386/387-7.c index e01ed2e0576..3c1ad606462 100644 --- a/gcc/testsuite/gcc.target/i386/387-7.c +++ b/gcc/testsuite/gcc.target/i386/387-7.c @@ -1,6 +1,7 @@ /* Verify that 387 fsincos instruction is generated. */ /* { dg-do compile } */ /* { dg-options "-O -ffast-math -mfpmath=387 -mfancy-math-387" } */ +/* { dg-require-effective-target c99_runtime } */ /* { dg-final { scan-assembler "fsincos" } } */ extern double sin (double); diff --git a/gcc/testsuite/gcc.target/i386/387-9.c b/gcc/testsuite/gcc.target/i386/387-9.c index 2667aa46872..469c635e479 100644 --- a/gcc/testsuite/gcc.target/i386/387-9.c +++ b/gcc/testsuite/gcc.target/i386/387-9.c @@ -1,6 +1,7 @@ /* Verify that 387 fsincos instruction is generated. */ /* { dg-do compile } */ /* { dg-options "-O -funsafe-math-optimizations -mfpmath=387 -mfancy-math-387" } */ +/* { dg-require-effective-target c99_runtime } */ extern double sin (double); extern double cos (double); diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c index c3f78ac3f25..2d2099f77cb 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */ +/* { dg-require-effective-target c99_runtime } */ #include "avx512f-rint-sfix-vec-1.c" diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c index c172e61f84a..fe473766c86 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */ +/* { dg-require-effective-target c99_runtime } */ #include "avx512f-rintf-sfix-vec-1.c" diff --git a/gcc/testsuite/gcc.target/i386/pr61403.c b/gcc/testsuite/gcc.target/i386/pr61403.c index 38ba4a1b1ec..48c7ba68d78 100644 --- a/gcc/testsuite/gcc.target/i386/pr61403.c +++ b/gcc/testsuite/gcc.target/i386/pr61403.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.2 -mtune=corei7" } */ +/* { dg-require-effective-target c99_runtime } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c index 6250906f3f1..4522f32035a 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-ceil-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c index c4ccad16df5..9f11e114eb3 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c index 89ce331ffa6..5404f76de43 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-floor-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c index b1912360860..d84607643e3 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c index c82c35340c5..5932943554b 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-rint-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c index 5188d4bc0b3..3bfbb25c036 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-rintf-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c index 96b8dcac747..782077ff7d0 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-round-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c index 1416dc9a798..9f1efcf789a 100644 --- a/gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c +++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundf-sfix-vec.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */ /* { dg-require-effective-target sse4 } */ +/* { dg-require-effective-target c99_runtime } */ #ifndef CHECK_H #define CHECK_H "sse4_1-check.h" -- 2.30.2