* gcc.target/i386/avx-recip-vec.c: New test.
* gcc.target/i386/avx-lrintf-vec.c: Ditto.
* gcc.target/i386/avx-lrint-vec.c: Ditto.
* gcc.target/i386/avx-ceilf-vec.c: Include sse4_1-ceilf-vec.c.
* gcc.target/i386/avx-ceil-vec.c: Include sse4_1-ceil-vec.c.
* gcc.target/i386/avx-floorf-vec.c: Include sse4_1-floorf-vec.c.
* gcc.target/i386/avx-floor-vec.c: Include sse4_1-floor-vec.c.
* gcc.target/i386/avx-rintf-vec.c: Include sse4_1-rintf-vec.c.
* gcc.target/i386/avx-rint-vec.c: Include sse4_1-rint-vec.c.
* gcc.target/i386/avx-roundf-vec.c: Include sse4_1-roundf-vec.c.
* gcc.target/i386/avx-round-vec.c: Include sse4_1-round-vec.c.
* gcc.target/i386/avx-truncf-vec.c: Include sse4_1-truncf-vec.c.
* gcc.target/i386/avx-trunc-vec.c: Include sse4_1-trunc-vec.c.
* gcc.target/i386/avx-copysignf-vec.c: Include sse-copysignf-vec.c.
* gcc.target/i386/avx-copysign-vec.c: Include sse2-copysign-vec.c.
From-SVN: r181364
+2011-11-14 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx-recip-vec.c: New test.
+ * gcc.target/i386/avx-lrintf-vec.c: Ditto.
+ * gcc.target/i386/avx-lrint-vec.c: Ditto.
+ * gcc.target/i386/avx-ceilf-vec.c: Include sse4_1-ceilf-vec.c.
+ * gcc.target/i386/avx-ceil-vec.c: Include sse4_1-ceil-vec.c.
+ * gcc.target/i386/avx-floorf-vec.c: Include sse4_1-floorf-vec.c.
+ * gcc.target/i386/avx-floor-vec.c: Include sse4_1-floor-vec.c.
+ * gcc.target/i386/avx-rintf-vec.c: Include sse4_1-rintf-vec.c.
+ * gcc.target/i386/avx-rint-vec.c: Include sse4_1-rint-vec.c.
+ * gcc.target/i386/avx-roundf-vec.c: Include sse4_1-roundf-vec.c.
+ * gcc.target/i386/avx-round-vec.c: Include sse4_1-round-vec.c.
+ * gcc.target/i386/avx-truncf-vec.c: Include sse4_1-truncf-vec.c.
+ * gcc.target/i386/avx-trunc-vec.c: Include sse4_1-trunc-vec.c.
+ * gcc.target/i386/avx-copysignf-vec.c: Include sse-copysignf-vec.c.
+ * gcc.target/i386/avx-copysign-vec.c: Include sse2-copysign-vec.c.
+
2011-11-14 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/51107
- * g++.dg/cpp0x/udlit-args-neg.C: Add check for void argument non-
- template literal operator.
+ * g++.dg/cpp0x/udlit-args-neg.C: Add check for void argument
+ non-template literal operator.
2011-11-14 Uros Bizjak <ubizjak@gmail.com>
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern double ceil (double);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (double *src)
-{
- int i, sign = 1;
- double f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- double a[NUM];
- double r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = ceil (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != ceil (a[i]))
- abort();
-}
+#include "sse4_1-ceil-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern float ceilf (float);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (float *src)
-{
- int i, sign = 1;
- float f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- float a[NUM];
- float r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = ceilf (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != ceilf (a[i]))
- abort();
-}
+#include "sse4_1-ceilf-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-extern double copysign (double, double);
-
-#define N 16
-
-double a[N] = {-0.1,-3.2,-6.3,-9.4,-12.5,-15.6,-18.7,-21.8,24.9,27.1,30.2,33.3,36.4,39.5,42.6,45.7};
-double b[N] = {-1.2,3.4,-5.6,7.8,-9.0,1.0,-2.0,3.0,-4.0,-5.0,6.0,7.0,-8.0,-9.0,10.0,11.0};
-double r[N];
-
-static void
-avx_test (void)
-{
- int i;
-
- for (i = 0; i < N; i++)
- r[i] = copysign (a[i], b[i]);
-
- /* check results: */
- for (i = 0; i < N; i++)
- if (r[i] != copysign (a[i], b[i]))
- abort ();
-}
+#include "sse2-copysign-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-options "-O2 -ftree-vectorize -mavx -mtune=generic" } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-extern float copysignf (float, float);
-
-#define N 16
-
-float a[N] = {-0.1f,-3.2f,-6.3f,-9.4f,-12.5f,-15.6f,-18.7f,-21.8f,24.9f,27.1f,30.2f,33.3f,36.4f,39.5f,42.6f,45.7f};
-float b[N] = {-1.2f,3.4f,-5.6f,7.8f,-9.0f,1.0f,-2.0f,3.0f,-4.0f,-5.0f,6.0f,7.0f,-8.0f,-9.0f,10.0f,11.0f};
-float r[N];
-
-static void
-avx_test (void)
-{
- int i;
-
- for (i = 0; i < N; i++)
- r[i] = copysignf (a[i], b[i]);
-
- /* check results: */
- for (i = 0; i < N; i++)
- if (r[i] != copysignf (a[i], b[i]))
- abort ();
-}
+#include "sse-copysignf-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern double floor (double);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (double *src)
-{
- int i, sign = 1;
- double f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- double a[NUM];
- double r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = floor (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != floor (a[i]))
- abort();
-}
+#include "sse4_1-floor-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern float floorf (float);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (float *src)
-{
- int i, sign = 1;
- float f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- float a[NUM];
- float r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = floorf (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != floorf (a[i]))
- abort();
-}
+#include "sse4_1-floorf-vec.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include "sse2-lrint-vec.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include "sse2-lrintf-vec.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx -mfpmath=sse -mrecip" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include "sse-recip-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern double rint (double);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (double *src)
-{
- int i, sign = 1;
- double f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- double a[NUM];
- double r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = rint (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != rint (a[i]))
- abort();
-}
+#include "sse4_1-rint-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern float rintf (float);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (float *src)
-{
- int i, sign = 1;
- float f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- float a[NUM];
- float r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = rintf (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != rintf (a[i]))
- abort();
-}
+#include "sse4_1-rintf-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern double round (double);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (double *src)
-{
- int i, sign = 1;
- double f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- double a[NUM];
- double r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = round (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != round (a[i]))
- abort();
-}
+#include "sse4_1-round-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern float roundf (float);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (float *src)
-{
- int i, sign = 1;
- float f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- float a[NUM];
- float r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = roundf (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != roundf (a[i]))
- abort();
-}
+#include "sse4_1-roundf-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern double trunc (double);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (double *src)
-{
- int i, sign = 1;
- double f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- double a[NUM];
- double r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = trunc (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != trunc (a[i]))
- abort();
-}
+#include "sse4_1-truncf-vec.c"
/* { dg-require-effective-target avx } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "avx-check.h"
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
-#include <math.h>
-
-extern float truncf (float);
-
-#define NUM 64
-
-static void
-__attribute__((__target__("fpmath=sse")))
-init_src (float *src)
-{
- int i, sign = 1;
- float f = rand ();
-
- for (i = 0; i < NUM; i++)
- {
- src[i] = (i + 1) * f * M_PI * sign;
- if (i < (NUM / 2))
- {
- if ((i % 6) == 0)
- f = f * src[i];
- }
- else if (i == (NUM / 2))
- f = rand ();
- else if ((i % 6) == 0)
- f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
- sign = -sign;
- }
-}
-
-static void
-__attribute__((__target__("fpmath=387")))
-avx_test (void)
-{
- float a[NUM];
- float r[NUM];
- int i;
-
- init_src (a);
-
- for (i = 0; i < NUM; i++)
- r[i] = truncf (a[i]);
-
- /* check results: */
- for (i = 0; i < NUM; i++)
- if (r[i] != truncf (a[i]))
- abort();
-}
+#include "sse4_1-truncf-vec.c"
/* { dg-options "-O2 -ftree-vectorize -msse" } */
/* { dg-require-effective-target sse } */
-#include "sse-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse_test
+#endif
+
+#include CHECK_H
extern float copysignf (float, float);
float r[N];
static void
-sse_test (void)
+TEST (void)
{
int i;
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
/* { dg-require-effective-target sse } */
-#include "sse-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse_test
+#endif
+
+#include CHECK_H
extern float sqrtf (float);
extern float fabsf (float);
float rc[N] = { 0.f, 3.f, 6.f, 9.f, 12.f, 18.f, 21.f, 27.f };
static void
-sse_test (void)
+TEST (void)
{
int i;
/* { dg-options "-O2 -ftree-vectorize -msse2" } */
/* { dg-require-effective-target sse2 } */
-#include "sse2-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse2-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse2_test
+#endif
+
+#include CHECK_H
extern double copysign (double, double);
double r[N];
static void
-sse2_test (void)
+TEST (void)
{
int i;
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse2" } */
/* { dg-require-effective-target sse2 } */
-#include "sse2-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse2-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse2_test
+#endif
+
+#include CHECK_H
extern long lrint (double);
long r[N];
static void
-sse2_test (void)
+TEST (void)
{
int i;
/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse2" } */
/* { dg-require-effective-target sse2 } */
-#include "sse2-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse2-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse2_test
+#endif
+
+#include CHECK_H
extern long lrintf (float);
long r[N];
static void
-sse2_test (void)
+TEST (void)
{
int i;
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
double a[NUM];
double r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
float a[NUM];
float r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
double a[NUM];
double r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
float a[NUM];
float r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
double a[NUM];
double r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
float a[NUM];
float r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
double a[NUM];
double r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
float a[NUM];
float r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
double a[NUM];
double r[NUM];
/* { dg-require-effective-target sse4 } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
-#include "sse4_1-check.h"
+#ifndef CHECK_H
+#define CHECK_H "sse4_1-check.h"
+#endif
+
+#ifndef TEST
+#define TEST sse4_1_test
+#endif
+
+#include CHECK_H
#include <math.h>
static void
__attribute__((__target__("fpmath=387")))
-sse4_1_test (void)
+TEST (void)
{
float a[NUM];
float r[NUM];