rs6000: Add tests for SSE4.1 "ceil" intrinsics

Add the tests for _mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss.

Copy a test for _mm_ceil_pd and _mm_ceil_ps from
gcc/testsuite/gcc.target/i386.

Define __VSX_SSE2__ to pick up some union definitions in
m128-check.h.

2021-07-30  Paul A. Clarke  <pc@us.ibm.com>

gcc/testsuite
	* gcc.target/powerpc/sse4_1-ceilpd.c: New.
	* gcc.target/powerpc/sse4_1-ceilps.c: New.
	* gcc.target/powerpc/sse4_1-ceilsd.c: New.
	* gcc.target/powerpc/sse4_1-ceilss.c: New.
	* gcc.target/powerpc/sse4_1-round-data.h: New.
	* gcc.target/powerpc/sse4_1-round.h: New.
	* gcc.target/powerpc/sse4_1-round2.h: New.
	* gcc.target/powerpc/sse4_1-roundpd-3.c: Copy from gcc.target/i386
	and adjust dg directives to suit.
	* gcc.target/powerpc/sse4_1-check.h (__VSX_SSE2__): Define.
This commit is contained in:
Paul A. Clarke 2021-07-01 21:00:26 -05:00
parent bd9a8737d4
commit d656a3d3ce
9 changed files with 420 additions and 0 deletions

View File

@ -0,0 +1,51 @@
/* { dg-do run } */
/* { dg-require-effective-target p8vector_hw } */
/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
#define NO_WARN_X86_INTRINSICS 1
#include <smmintrin.h>
#define VEC_T __m128d
#define FP_T double
#define ROUND_INTRIN(x, mode) _mm_ceil_pd (x)
#include "sse4_1-round-data.h"
static struct data data[] = {
{ .value = { .f = { 0.00, 0.25 } }, .answer = { 0.0, 1.0 } },
{ .value = { .f = { 0.50, 0.75 } }, .answer = { 1.0, 1.0 } },
{ { .f = { 0x1.ffffffffffffcp+50, 0x1.ffffffffffffdp+50 } },
{ 0x1.ffffffffffffcp+50, 0x1.0000000000000p+51 } },
{ { .f = { 0x1.ffffffffffffep+50, 0x1.fffffffffffffp+50 } },
{ 0x1.0000000000000p+51, 0x1.0000000000000p+51 } },
{ { .f = { 0x1.0000000000000p+51, 0x1.0000000000001p+51 } },
{ 0x1.0000000000000p+51, 0x1.0000000000002p+51 } },
{ { .f = { 0x1.0000000000002p+51, 0x1.0000000000003p+51 } },
{ 0x1.0000000000002p+51, 0x1.0000000000004p+51 } },
{ { .f = { 0x1.ffffffffffffep+51, 0x1.fffffffffffffp+51 } },
{ 0x1.ffffffffffffep+51, 0x1.0000000000000p+52 } },
{ { .f = { 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
{ 0x1.0000000000000p+52, 0x1.0000000000001p+52 } },
{ { .f = { -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
{ -0x1.0000000000001p+52, -0x1.0000000000000p+52 } },
{ { .f = { -0x1.fffffffffffffp+51, -0x1.ffffffffffffep+51 } },
{ -0x1.ffffffffffffep+51, -0x1.ffffffffffffep+51 } },
{ { .f = { -0x1.0000000000003p+51, -0x1.0000000000002p+51 } },
{ -0x1.0000000000002p+51, -0x1.0000000000002p+51 } },
{ { .f = { -0x1.0000000000001p+51, -0x1.0000000000000p+51 } },
{ -0x1.0000000000000p+51, -0x1.0000000000000p+51 } },
{ { .f = { -0x1.fffffffffffffp+50, -0x1.ffffffffffffep+50 } },
{ -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
{ { .f = { -0x1.ffffffffffffdp+50, -0x1.ffffffffffffcp+50 } },
{ -0x1.ffffffffffffcp+50, -0x1.ffffffffffffcp+50 } },
{ { .f = { -1.00, -0.75 } }, { -1.0, 0.0 } },
{ { .f = { -0.50, -0.25 } }, { 0.0, 0.0 } }
};
#include "sse4_1-round.h"

View File

@ -0,0 +1,41 @@
/* { dg-do run } */
/* { dg-require-effective-target p8vector_hw } */
/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
#define NO_WARN_X86_INTRINSICS 1
#include <smmintrin.h>
#define VEC_T __m128
#define FP_T float
#define ROUND_INTRIN(x, mode) _mm_ceil_ps (x)
#include "sse4_1-round-data.h"
static struct data data[] = {
{ { .f = { 0.00, 0.25, 0.50, 0.75 } }, { 0.0, 1.0, 1.0, 1.0 } },
{ { .f = { 0x1.fffff8p+21, 0x1.fffffap+21,
0x1.fffffcp+21, 0x1.fffffep+21 } },
{ 0x1.fffff8p+21, 0x1.000000p+22,
0x1.000000p+22, 0x1.000000p+22 } },
{ { .f = { 0x1.fffffap+22, 0x1.fffffcp+22,
0x1.fffffep+22, 0x1.fffffep+23 } },
{ 0x1.fffffcp+22, 0x1.fffffcp+22,
0x1.000000p+23, 0x1.fffffep+23 } },
{ { .f = { -0x1.fffffep+23, -0x1.fffffep+22,
-0x1.fffffcp+22, -0x1.fffffap+22 } },
{ -0x1.fffffep+23, -0x1.fffffcp+22,
-0x1.fffffcp+22, -0x1.fffff8p+22 } },
{ { .f = { -0x1.fffffep+21, -0x1.fffffcp+21,
-0x1.fffffap+21, -0x1.fffff8p+21 } },
{ -0x1.fffff8p+21, -0x1.fffff8p+21,
-0x1.fffff8p+21, -0x1.fffff8p+21 } },
{ { .f = { -1.00, -0.75, -0.50, -0.25 } }, { -1.0, 0.0, 0.0, 0.0 } }
};
#include "sse4_1-round.h"

View File

@ -0,0 +1,119 @@
/* { dg-do run } */
/* { dg-require-effective-target p8vector_hw } */
/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
#define NO_WARN_X86_INTRINSICS 1
#include <smmintrin.h>
#define VEC_T __m128d
#define FP_T double
#define ROUND_INTRIN(x, y) _mm_ceil_sd (x, y)
#include "sse4_1-round-data.h"
static struct data2 data[] = {
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0.00, IGNORED } },
.answer = { 0.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0.25, IGNORED } },
.answer = { 1.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0.50, IGNORED } },
.answer = { 1.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0.75, IGNORED } },
.answer = { 1.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.ffffffffffffcp+50, IGNORED } },
.answer = { 0x1.ffffffffffffcp+50, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.ffffffffffffdp+50, IGNORED } },
.answer = { 0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.ffffffffffffep+50, IGNORED } },
.answer = { 0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffffffffffp+50, IGNORED } },
.answer = { 0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000000p+51, IGNORED } },
.answer = { 0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000001p+51, IGNORED } },
.answer = { 0x1.0000000000002p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000002p+51, IGNORED } },
.answer = { 0x1.0000000000002p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000003p+51, IGNORED } },
.answer = { 0x1.0000000000004p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.ffffffffffffep+51, IGNORED } },
.answer = { 0x1.ffffffffffffep+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffffffffffp+51, IGNORED } },
.answer = { 0x1.0000000000000p+52, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000000p+52, IGNORED } },
.answer = { 0x1.0000000000000p+52, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { 0x1.0000000000001p+52, IGNORED } },
.answer = { 0x1.0000000000001p+52, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000001p+52, IGNORED } },
.answer = { -0x1.0000000000001p+52, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000000p+52, IGNORED } },
.answer = { -0x1.0000000000000p+52, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffffffffffp+51, IGNORED } },
.answer = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.ffffffffffffep+51, IGNORED } },
.answer = { -0x1.ffffffffffffep+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000003p+51, IGNORED } },
.answer = { -0x1.0000000000002p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000002p+51, IGNORED } },
.answer = { -0x1.0000000000002p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000001p+51, IGNORED } },
.answer = { -0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.0000000000000p+51, IGNORED } },
.answer = { -0x1.0000000000000p+51, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.ffffffffffffcp+50, IGNORED } },
.answer = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.ffffffffffffep+50, IGNORED } },
.answer = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.ffffffffffffdp+50, IGNORED } },
.answer = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0x1.ffffffffffffcp+50, IGNORED } },
.answer = { -0x1.ffffffffffffcp+50, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -1.00, IGNORED } },
.answer = { -1.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0.75, IGNORED } },
.answer = { -0.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0.50, IGNORED } },
.answer = { -0.0, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH } },
.value2 = { .f = { -0.25, IGNORED } },
.answer = { -0.0, PASSTHROUGH } }
};
#include "sse4_1-round2.h"

View File

@ -0,0 +1,95 @@
/* { dg-do run } */
/* { dg-require-effective-target p8vector_hw } */
/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
#define NO_WARN_X86_INTRINSICS 1
#include <smmintrin.h>
#define VEC_T __m128
#define FP_T float
#define ROUND_INTRIN(x, y) _mm_ceil_ss (x, y)
#include "sse4_1-round-data.h"
static struct data2 data[] = {
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0.00, IGNORED, IGNORED, IGNORED } },
.answer = { 0.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0.25, IGNORED, IGNORED, IGNORED } },
.answer = { 1.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0.50, IGNORED, IGNORED, IGNORED } },
.answer = { 1.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0.75, IGNORED, IGNORED, IGNORED } },
.answer = { 1.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffff8p+21, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffap+21, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffcp+21, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffep+21, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.000000p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffap+22, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffcp+22, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffep+22, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.000000p+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { 0x1.fffffep+23, IGNORED, IGNORED, IGNORED } },
.answer = { 0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffep+23, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffffep+23, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffep+22, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffcp+22, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffffcp+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffap+22, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffff8p+22, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffep+21, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffcp+21, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffffap+21, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0x1.fffff8p+21, IGNORED, IGNORED, IGNORED } },
.answer = { -0x1.fffff8p+21, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -1.00, IGNORED, IGNORED, IGNORED } },
.answer = { -1.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0.75, IGNORED, IGNORED, IGNORED } },
.answer = { 0.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0.50, IGNORED, IGNORED, IGNORED } },
.answer = { 0.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
{ .value1 = { .f = { IGNORED, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } },
.value2 = { .f = { -0.25, IGNORED, IGNORED, IGNORED } },
.answer = { 0.0, PASSTHROUGH, PASSTHROUGH, PASSTHROUGH } }
};
#include "sse4_1-round2.h"

View File

@ -1,6 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
/* Define this to enable the combination of VSX vector double and
SSE2 data types. */
#define __VSX_SSE2__ 1
#include "m128-check.h"
//#define DEBUG 1

View File

@ -0,0 +1,20 @@
/* Pick a few numbers at random which are not in the input data and
unlikely to show up naturally. */
#define PASSTHROUGH -29.5
#define IGNORED -61.5
union value {
VEC_T x;
FP_T f[sizeof (VEC_T) / sizeof (FP_T)];
};
struct data {
union value value;
double answer[sizeof (VEC_T) / sizeof (FP_T)];
};
struct data2 {
union value value1;
union value value2;
double answer[sizeof (VEC_T) / sizeof (FP_T)];
};

View File

@ -0,0 +1,27 @@
#include <fenv.h>
#include <smmintrin.h>
#include "sse4_1-check.h"
#define DIM(a) (sizeof (a) / sizeof (a)[0])
static int modes[] = { FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO };
static void
TEST (void)
{
int i, j, ri, round_save;
round_save = fegetround ();
for (ri = 0; ri < DIM (modes); ri++) {
fesetround (modes[ri]);
for (i = 0; i < DIM (data); i++) {
union value guess;
guess.x = ROUND_INTRIN (data[i].value.x, /* Ignored. */);
for (j = 0; j < DIM (data[i].value.f); j++) {
if (guess.f[j] != data[i].answer[j])
abort ();
}
}
}
fesetround (round_save);
}

View File

@ -0,0 +1,27 @@
#include <fenv.h>
#include <smmintrin.h>
#include "sse4_1-check.h"
#define DIM(a) (sizeof (a) / sizeof (a)[0])
static int modes[] = { FE_TONEAREST, FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO };
static void
TEST (void)
{
int i, j, ri, round_save;
round_save = fegetround ();
for (ri = 0; ri < DIM (modes); ri++) {
fesetround (modes[ri]);
for (i = 0; i < DIM (data); i++) {
union value guess;
guess.x = ROUND_INTRIN (data[i].value1.x, data[i].value2.x);
for (j = 0; j < DIM (data[i].value1.f); j++) {
if (guess.f[j] != data[i].answer[j])
abort ();
}
}
}
fesetround (round_save);
}

View File

@ -0,0 +1,36 @@
/* { dg-do run } */
/* { dg-require-effective-target p8vector_hw } */
/* { dg-options "-O2 -mpower8-vector -Wno-psabi" } */
#ifndef CHECK_H
#define CHECK_H "sse4_1-check.h"
#endif
#ifndef TEST
#define TEST sse4_1_test
#endif
#include CHECK_H
#include <smmintrin.h>
static void
TEST (void)
{
union128d u, s;
double e[2] = {0.0};
int i;
s.x = _mm_set_pd (1.1234, -2.3478);
u.x = _mm_ceil_pd (s.x);
for (i = 0; i < 2; i++)
{
__m128d tmp = _mm_load_sd (&s.a[i]);
tmp = _mm_ceil_sd (tmp, tmp);
_mm_store_sd (&e[i], tmp);
}
if (check_union128d (u, e))
abort ();
}