wrap math.h for M_PI et al in target/i386 tests

Message ID orh87k8b2n.fsf@lxoliva.fsfla.org
State New
Headers show
Series
  • wrap math.h for M_PI et al in target/i386 tests
Related show

Commit Message

Alexandre Oliva July 18, 2019, 12:01 a.m.
Most but not all of the tests that expect M_PI, M_PI_2 and/or M_PI_4
to be defined in math.h explicitly exclude one target system that does
not satisfy this non-standard assumption.

This patch introduces a wrapper header that includes math.h and then
conditionally supplies the missing non-standard macro definitions.
With that, we can drop the dg-skip-if "no M_PI" exclusions.

Tested on x86_64-linux-gnu, with a regular math.h, and with a "manually
fixincluded" math.h so as to not define M_PI, M_PI_2 and M_PI_4.  Ok to
install?


for  gcc/testsuite/ChangeLog

	* gcc.target/i386/math_m_pi.h: New.
	* gcc.target/i386/sse4_1-round.h: Use it.
	* gcc.target/i386/pr73350.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmpd-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.
	* gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.
	* gcc.target/i386/avx-ceil-sfix-2-vec.c: Likewise.  Drop
	dg-skip-if "no M_PI".
	* gcc.target/i386/avx-cvt-2-vec.c: Likewise.
	* gcc.target/i386/avx-floor-sfix-2-vec.c: Likewise.
	* gcc.target/i386/avx-rint-sfix-2-vec.c: Likewise.
	* gcc.target/i386/avx-round-sfix-2-vec.c: Likewise.
	* gcc.target/i386/avx512f-ceil-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-ceil-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-ceilf-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-floor-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-floor-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-floorf-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-floorf-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-rint-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-rintf-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-round-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-roundf-sfix-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-trunc-vec-1.c: Likewise.
	* gcc.target/i386/avx512f-truncf-vec-1.c: Likewise.
	* gcc.target/i386/sse2-cvt-vec.c: Likewise.
	* gcc.target/i386/sse4_1-ceil-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-ceil-vec.c: Likewise.
	* gcc.target/i386/sse4_1-ceilf-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-ceilf-vec.c: Likewise.
	* gcc.target/i386/sse4_1-floor-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-floor-vec.c: Likewise.
	* gcc.target/i386/sse4_1-floorf-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-floorf-vec.c: Likewise.
	* gcc.target/i386/sse4_1-rint-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-rint-vec.c: Likewise.
	* gcc.target/i386/sse4_1-rintf-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-rintf-vec.c: Likewise.
	* gcc.target/i386/sse4_1-round-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-round-vec.c: Likewise.
	* gcc.target/i386/sse4_1-roundf-sfix-vec.c: Likewise.
	* gcc.target/i386/sse4_1-roundf-vec.c: Likewise.
	* gcc.target/i386/sse4_1-roundsd-4.c: Likewise.
	* gcc.target/i386/sse4_1-roundss-4.c: Likewise.
	* gcc.target/i386/sse4_1-trunc-vec.c: Likewise.
	* gcc.target/i386/sse4_1-truncf-vec.c: Likewise.
---
 .../gcc.target/i386/avx-ceil-sfix-2-vec.c          |    3 +--
 gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c  |    1 -
 gcc/testsuite/gcc.target/i386/avx-ceil-vec.c       |    1 -
 gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c |    1 -
 gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c      |    1 -
 gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c      |    3 +--
 gcc/testsuite/gcc.target/i386/avx-cvt-vec.c        |    1 -
 .../gcc.target/i386/avx-floor-sfix-2-vec.c         |    3 +--
 gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c |    1 -
 gcc/testsuite/gcc.target/i386/avx-floor-vec.c      |    1 -
 .../gcc.target/i386/avx-floorf-sfix-vec.c          |    1 -
 gcc/testsuite/gcc.target/i386/avx-floorf-vec.c     |    1 -
 .../gcc.target/i386/avx-rint-sfix-2-vec.c          |    3 +--
 gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c  |    1 -
 gcc/testsuite/gcc.target/i386/avx-rint-vec.c       |    1 -
 gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c |    1 -
 gcc/testsuite/gcc.target/i386/avx-rintf-vec.c      |    1 -
 .../gcc.target/i386/avx-round-sfix-2-vec.c         |    3 +--
 gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c |    1 -
 gcc/testsuite/gcc.target/i386/avx-round-vec.c      |    1 -
 .../gcc.target/i386/avx-roundf-sfix-vec.c          |    1 -
 gcc/testsuite/gcc.target/i386/avx-roundf-vec.c     |    1 -
 gcc/testsuite/gcc.target/i386/avx-trunc-vec.c      |    1 -
 gcc/testsuite/gcc.target/i386/avx-truncf-vec.c     |    1 -
 .../gcc.target/i386/avx512f-ceil-sfix-vec-1.c      |    3 +--
 gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c |    3 +--
 .../gcc.target/i386/avx512f-ceilf-sfix-vec-1.c     |    3 +--
 .../gcc.target/i386/avx512f-ceilf-vec-1.c          |    3 +--
 .../gcc.target/i386/avx512f-floor-sfix-vec-1.c     |    3 +--
 .../gcc.target/i386/avx512f-floor-vec-1.c          |    3 +--
 .../gcc.target/i386/avx512f-floorf-sfix-vec-1.c    |    3 +--
 .../gcc.target/i386/avx512f-floorf-vec-1.c         |    3 +--
 .../gcc.target/i386/avx512f-rint-sfix-vec-1.c      |    3 +--
 .../gcc.target/i386/avx512f-rintf-sfix-vec-1.c     |    3 +--
 .../gcc.target/i386/avx512f-round-sfix-vec-1.c     |    3 +--
 .../gcc.target/i386/avx512f-roundf-sfix-vec-1.c    |    3 +--
 .../gcc.target/i386/avx512f-trunc-vec-1.c          |    3 +--
 .../gcc.target/i386/avx512f-truncf-vec-1.c         |    3 +--
 .../gcc.target/i386/avx512f-vfixupimmpd-2.c        |    2 +-
 .../gcc.target/i386/avx512f-vfixupimmps-2.c        |    2 +-
 .../gcc.target/i386/avx512f-vfixupimmsd-2.c        |    2 +-
 .../gcc.target/i386/avx512f-vfixupimmss-2.c        |    2 +-
 gcc/testsuite/gcc.target/i386/math_m_pi.h          |   10 ++++++++++
 gcc/testsuite/gcc.target/i386/pr73350.c            |    2 +-
 gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c       |    3 +--
 .../gcc.target/i386/sse4_1-ceil-sfix-vec.c         |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c    |    3 +--
 .../gcc.target/i386/sse4_1-ceilf-sfix-vec.c        |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c   |    3 +--
 .../gcc.target/i386/sse4_1-floor-sfix-vec.c        |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c   |    3 +--
 .../gcc.target/i386/sse4_1-floorf-sfix-vec.c       |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c  |    3 +--
 .../gcc.target/i386/sse4_1-rint-sfix-vec.c         |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c    |    3 +--
 .../gcc.target/i386/sse4_1-rintf-sfix-vec.c        |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c   |    3 +--
 .../gcc.target/i386/sse4_1-round-sfix-vec.c        |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c   |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-round.h       |    2 +-
 .../gcc.target/i386/sse4_1-roundf-sfix-vec.c       |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c  |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c   |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c   |    1 -
 gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c   |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c   |    3 +--
 gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c  |    3 +--
 78 files changed, 56 insertions(+), 117 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/i386/math_m_pi.h


-- 
Alexandre Oliva, freedom fighter  he/him   https://FSFLA.org/blogs/lxo
Be the change, be Free!                 FSF Latin America board member
GNU Toolchain Engineer                        Free Software Evangelist
Hay que enGNUrecerse, pero sin perder la terGNUra jamás - Che GNUevara

Comments

Alexandre Oliva July 30, 2019, 8:49 a.m. | #1
On Jul 17, 2019, Alexandre Oliva <oliva@adacore.com> wrote:

> Most but not all of the tests that expect M_PI, M_PI_2 and/or M_PI_4

> to be defined in math.h explicitly exclude one target system that does

> not satisfy this non-standard assumption.


> This patch introduces a wrapper header that includes math.h and then

> conditionally supplies the missing non-standard macro definitions.

> With that, we can drop the dg-skip-if "no M_PI" exclusions.


> Tested on x86_64-linux-gnu, with a regular math.h, and with a "manually

> fixincluded" math.h so as to not define M_PI, M_PI_2 and M_PI_4.  Ok to

> install?


Ping?

https://gcc.gnu.org/ml/gcc-patches/2019-07/msg01211.html


-- 
Alexandre Oliva, freedom fighter  he/him   https://FSFLA.org/blogs/lxo
Be the change, be Free!                 FSF Latin America board member
GNU Toolchain Engineer                        Free Software Evangelist
Hay que enGNUrecerse, pero sin perder la terGNUra jamás - Che GNUevara

Patch

diff --git a/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-2-vec.c b/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-2-vec.c
index 45b7af7b06a2c..8d3b0a6d79f47 100644
--- a/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-2-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-2-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double ceil (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c
index ac0911fe844d0..7466041d27999 100644
--- a/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-ceil-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-ceil-vec.c b/gcc/testsuite/gcc.target/i386/avx-ceil-vec.c
index 0e76ab8026c94..3edc17ea1828e 100644
--- a/gcc/testsuite/gcc.target/i386/avx-ceil-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-ceil-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c
index 789b78e76a78d..07e2b80992a95 100644
--- a/gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-ceilf-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c b/gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c
index c324a9b4f4fc6..641e34f5ca340 100644
--- a/gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c b/gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c
index 0081dcf381212..ad381c07ec1ea 100644
--- a/gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-cvt-2-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx-check.h"
@@ -13,7 +12,7 @@ 
 
 #include CHECK_H
 
-#include <math.h>
+#include "math_m_pi.h"
 
 #define NUM 4
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-cvt-vec.c b/gcc/testsuite/gcc.target/i386/avx-cvt-vec.c
index 4dcfa39895485..72e8b1d1712a1 100644
--- a/gcc/testsuite/gcc.target/i386/avx-cvt-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-cvt-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-floor-sfix-2-vec.c b/gcc/testsuite/gcc.target/i386/avx-floor-sfix-2-vec.c
index 0a28c762b3ceb..928a4a2f6028c 100644
--- a/gcc/testsuite/gcc.target/i386/avx-floor-sfix-2-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-floor-sfix-2-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double floor (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c
index efa557cf79177..7ec690b5a317b 100644
--- a/gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-floor-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-floor-vec.c b/gcc/testsuite/gcc.target/i386/avx-floor-vec.c
index 1d7fe50431765..9fcab1ddbed3f 100644
--- a/gcc/testsuite/gcc.target/i386/avx-floor-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-floor-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c
index 0c1587a12090b..02c8177216da8 100644
--- a/gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-floorf-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-floorf-vec.c b/gcc/testsuite/gcc.target/i386/avx-floorf-vec.c
index 73da85be9e19d..b2e707eac6a4c 100644
--- a/gcc/testsuite/gcc.target/i386/avx-floorf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-floorf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-rint-sfix-2-vec.c b/gcc/testsuite/gcc.target/i386/avx-rint-sfix-2-vec.c
index e6c47b8dff19d..dce850ddfc92a 100644
--- a/gcc/testsuite/gcc.target/i386/avx-rint-sfix-2-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-rint-sfix-2-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double rint (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c
index 824f2eb7d528a..4a7f67db0202d 100644
--- a/gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-rint-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-rint-vec.c b/gcc/testsuite/gcc.target/i386/avx-rint-vec.c
index c1d420c6c36e0..3af517a3762f1 100644
--- a/gcc/testsuite/gcc.target/i386/avx-rint-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-rint-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c
index e5ddf790d75fd..3dfbb60bed717 100644
--- a/gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-rintf-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-rintf-vec.c b/gcc/testsuite/gcc.target/i386/avx-rintf-vec.c
index caf365da68581..8b5f5e0722dd3 100644
--- a/gcc/testsuite/gcc.target/i386/avx-rintf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-rintf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-round-sfix-2-vec.c b/gcc/testsuite/gcc.target/i386/avx-round-sfix-2-vec.c
index dc0a7db33d885..fe6970bc377ad 100644
--- a/gcc/testsuite/gcc.target/i386/avx-round-sfix-2-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-round-sfix-2-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "avx-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double round (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c
index 5adfffa5f1037..5670636286e20 100644
--- a/gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-round-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-round-vec.c b/gcc/testsuite/gcc.target/i386/avx-round-vec.c
index c43c057049d9c..26a6878ac481f 100644
--- a/gcc/testsuite/gcc.target/i386/avx-round-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-round-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c
index 1fd4591233de3..827e476679258 100644
--- a/gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-roundf-sfix-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-roundf-vec.c b/gcc/testsuite/gcc.target/i386/avx-roundf-vec.c
index 978013eb12662..3dae33003e1e1 100644
--- a/gcc/testsuite/gcc.target/i386/avx-roundf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-roundf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-trunc-vec.c b/gcc/testsuite/gcc.target/i386/avx-trunc-vec.c
index a1ee6d461f399..8e193af36f108 100644
--- a/gcc/testsuite/gcc.target/i386/avx-trunc-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-trunc-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-truncf-vec.c b/gcc/testsuite/gcc.target/i386/avx-truncf-vec.c
index a1ee6d461f399..8e193af36f108 100644
--- a/gcc/testsuite/gcc.target/i386/avx-truncf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/avx-truncf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
 /* { dg-require-effective-target avx } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define CHECK_H "avx-check.h"
 #define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
index d7d6916631702..ab058334a8c9d 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 extern double ceil (double);
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
index fc48b1572b9b6..3ab64559cd28b 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
index c6d53d89fc6e0..27a4bb95342ce 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
index 4788825fc3d4a..54222da76f426 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
index b46ea9fc28337..9eff15f5006c7 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 extern double floor (double);
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
index b7cbed005dd90..be9709951f7a9 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
index 6a25f438a8e79..7a84fcbc73146 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
index 69fc73d78efcc..fcc0b275860fe 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
index 8e1745aa13ab0..d22385c95e521 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
index ac3e9a259735d..6a627ab4ac824 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
index 61bea578e1862..4c83e7b051266 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
index c5ec9e7ec0096..1341a5bbe537c 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
index dfb93d7232442..b8b5d0730a8ca 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
index db13e7128298d..7dfd575f019c9 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
@@ -1,10 +1,9 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 #include "avx512f-check.h"
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
index 98b5ed1c1c7f3..8a673d7d74edf 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
@@ -9,7 +9,7 @@ 
 
 #define SIZE (AVX512F_LEN / 64)
 #include "avx512f-mask-type.h"
-#include "math.h"
+#include "math_m_pi.h"
 #include "float.h"
 
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
index e5a917f121cc7..815a088d0ae94 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
@@ -9,7 +9,7 @@ 
 
 #define SIZE (AVX512F_LEN / 32)
 #include "avx512f-mask-type.h"
-#include "math.h"
+#include "math_m_pi.h"
 #include "float.h"
 
 static void
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
index d3cd28cbeef50..88df19bd437c2 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
@@ -5,7 +5,7 @@ 
 
 #include "avx512f-check.h"
 #include "avx512f-helper.h"
-#include <math.h>
+#include "math_m_pi.h"
 #include <float.h>
 #include "avx512f-mask-type.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
index 7364cc5b9a951..65ec045240302 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
@@ -5,7 +5,7 @@ 
 
 #include "avx512f-check.h"
 #include "avx512f-helper.h"
-#include <math.h>
+#include "math_m_pi.h"
 #include <float.h>
 #include "avx512f-mask-type.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/math_m_pi.h b/gcc/testsuite/gcc.target/i386/math_m_pi.h
new file mode 100644
index 0000000000000..0757a40c1eb1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/math_m_pi.h
@@ -0,0 +1,10 @@ 
+#include <math.h>
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
+#ifndef M_PI_2
+# define M_PI_2 1.57079632679489661923
+#endif
+#ifndef M_PI_4
+# define M_PI_4 0.78539816339744830962
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/pr73350.c b/gcc/testsuite/gcc.target/i386/pr73350.c
index 62f6cd42386cb..30cb8b17468f4 100644
--- a/gcc/testsuite/gcc.target/i386/pr73350.c
+++ b/gcc/testsuite/gcc.target/i386/pr73350.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -mavx512f" } */
 /* { dg-require-effective-target avx512f } */
-#include <math.h>
+#include "math_m_pi.h"
 #define AVX512F
 #include "avx512f-helper.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c b/gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c
index 8a811a3defe53..67fae51ea1ebf 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-cvt-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse2" } */
 /* { dg-require-effective-target sse2 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse2-check.h"
@@ -13,7 +12,7 @@ 
 
 #include CHECK_H
 
-#include <math.h>
+#include "math_m_pi.h"
 
 #define NUM 64
 
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 bb32c8d7669fc..6250906f3f154 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double ceil (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c
index 4193aaa97cf63..2ef43aec118f9 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double ceil (double);
 
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 971ccb853e144..c4ccad16df5e1 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float ceilf (float);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c
index e2ebafc6db226..1382d2028f9a3 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float ceilf (float);
 
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 15db225d23750..89ce331ffa60b 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double floor (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c
index a33f7d915db97..32b7002632461 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double floor (double);
 
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 bf05af3e2811d..b19123608601f 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 #define NUM 64
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
index 13630fb54604c..d2f4a85d0c5aa 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 #define NUM 64
 
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 61119333526d8..c82c35340c590 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double rint (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c
index 88965a542b75a..309f17eb83f36 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double rint (double);
 
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 12d3dbeb14d44..5188d4bc0b3a3 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float rintf (float);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c
index 362832d15c48b..8c31f8de9bc4f 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float rintf (float);
 
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 c54aceef5920f..96b8dcac7474c 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double round (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c
index 83aeb64a773d3..e3e9328640ca9 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-round-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double round (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-round.h b/gcc/testsuite/gcc.target/i386/sse4_1-round.h
index dfb0b778cdcf6..adff48b8b2f4c 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-round.h
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-round.h
@@ -1,5 +1,5 @@ 
 #include <smmintrin.h>
-#include <math.h>
+#include "math_m_pi.h"
 
 #define NUM 64
 
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 cd1107110ccb2..1416dc9a79853 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,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float roundf (float);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c
index b55e5df0585f7..fc0aead01fb3b 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float roundf (float);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c
index 8baee3390177a..37f20285f54d0 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-1.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c
index 86b78ed75782b..7f0475f75cebb 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-2.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c
index 6e6a05c59c254..4a1f81026f048 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundpd-3.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c
index fab227869fc4a..fa8002d7e7109 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-1.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c
index 405c55d45a4d2..673c786258d42 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-2.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c
index 97485b9586767..9b52ae5ba2aa5 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundps-3.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c
index e6cec0b9478a3..f3ecd0e2744e1 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-1.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c
index 54ca21f8f2cd0..91dfd38fd9619 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-2.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c
index a59d6f86e5fac..0a69e0663eb4d 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-3.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c
index ff8b09eeba62f..d8dcca00eface 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundsd-4.c
@@ -1,12 +1,11 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
 #include <smmintrin.h>
-#include <math.h>
+#include "math_m_pi.h"
 #include <string.h>
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
index 9c20b90ad05e4..01940bd0ba11b 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
index 072664e1573e9..4c73331a27748 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
index 97c69fdbcb25f..774c1939c3030 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c
index 9548890863018..0a9ab59e42cb1 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-roundss-4.c
@@ -1,12 +1,11 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target sse4 } */
 /* { dg-options "-O2 -msse4.1" } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #include "sse4_1-check.h"
 
 #include <smmintrin.h>
-#include <math.h>
+#include "math_m_pi.h"
 #include <string.h>
 
 #define NUM 64
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c
index 5c27083798070..4f4786c701685 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern double trunc (double);
 
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c
index e491feedd9230..691ea7b8e787f 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c
@@ -1,7 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ffast-math -ftree-vectorize -msse4.1" } */
 /* { dg-require-effective-target sse4 } */
-/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
 
 #ifndef CHECK_H
 #define CHECK_H "sse4_1-check.h"
@@ -14,7 +13,7 @@ 
 #include CHECK_H
 
 #define __NO_MATH_INLINES
-#include <math.h>
+#include "math_m_pi.h"
 
 extern float truncf (float);