PR target/88794
Revert:
-
2018-11-06 Wei Xiao <wei3.xiao@intel.com>
* config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
+2019-01-17 Wei Xiao <wei3.xiao@intel.com>
+
+ * gcc.target/i386/avx512f-vfixupimmpd-2.c: Fix the test cases for
+ VFIXUPIMM* intrinsics.
+ * gcc.target/i386/avx512f-vfixupimmps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
+
2019-01-17 Wei Xiao <wei3.xiao@intel.com>
PR target/88794
static void
-CALC (double *r, double src, long long tbl)
+CALC (double *r, double dest, double src, long long tbl)
{
switch (tbl & 0xf)
{
case 0:
- *r = src;
+ *r = dest;
break;
case 1:
*r = src;
float vals[2] = { -10, 10 };
- int controls[8] = {0x11111111, 0x77777777, 0x77777777, 0x88888888,
+ int controls[8] = {0, 0x11111111, 0x77777777, 0x88888888,
0x99999999, 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc};
MASK_TYPE mask = MASK_VALUE;
res2.a[j] = DEFAULT_VALUE;
res3.a[j] = DEFAULT_VALUE;
- CALC (&res_ref[j], s1.a[j], s2.a[j]);
+ CALC (&res_ref[j], res1.a[j], s1.a[j], s2.a[j]);
}
res1.x = INTRINSIC (_fixupimm_pd) (res1.x, s1.x, s2.x, 0);
#include "float.h"
static void
-CALC (float *r, float src, int tbl)
+CALC (float *r, float dest, float src, int tbl)
{
switch (tbl & 0xf)
{
case 0:
- *r = src;
+ *r = dest;
break;
case 1:
*r = src;
float vals[2] = { -10, 10 };
- int controls[16] = { 0x11111111,
- 0x77777777, 0x88888888, 0x99999999,
+ int controls[16] = { 0,
+ 0x11111111, 0x88888888, 0x99999999,
0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
0x77777777, 0x88888888, 0x99999999,
0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
res2.a[j] = DEFAULT_VALUE;
res3.a[j] = DEFAULT_VALUE;
- CALC (&res_ref[j], s1.a[j], s2.a[j]);
+ CALC (&res_ref[j], res1.a[j], s1.a[j], s2.a[j]);
}
res1.x = INTRINSIC (_fixupimm_ps) (res1.x, s1.x, s2.x, 0);
#include "avx512f-mask-type.h"
void
-compute_fixupimmpd (double *r, double src, long long tbl)
+compute_fixupimmpd (double *r, double dest, double src, long long tbl)
{
switch (tbl & 0xf)
{
case 0:
- *r = src;
+ *r = dest;
break;
case 1:
*r = src;
int i, j;
float vals[2] = { -10, 10 };
- int controls[10] = { 0x11111111,
+ int controls[10] = { 0,
0x77777777, 0x88888888, 0x99999999,
0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
0xdddddddd, 0xeeeeeeee, 0xffffffff
for (j = 0; j < 10; j++)
{
s2.a[0] = controls[j];
- compute_fixupimmpd (&res_ref[0], s1.a[0], s2.a[0]);
+ compute_fixupimmpd (&res_ref[0], res1.a[0], s1.a[0], s2.a[0]);
res1.x = _mm_fixupimm_sd (res1.x, s1.x, s2.x, 0);
res2.x = _mm_mask_fixupimm_sd (res2.x, mask, s1.x, s2.x, 0);
#include "avx512f-mask-type.h"
void
-compute_fixupimmps (float *r, float src, int tbl)
+compute_fixupimmps (float *r, float dest, float src, int tbl)
{
switch (tbl & 0xf)
{
case 0:
- *r = src;
+ *r = dest;
break;
case 1:
*r = src;
int i, j, k;
float vals[2] = { -10, 10 };
- int controls[10] = { 0x11111111,
+ int controls[10] = { 0,
0x77777777, 0x88888888, 0x99999999,
0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
0xdddddddd, 0xeeeeeeee, 0xffffffff
for (j = 0; j < 10; j++)
{
s2.a[0] = controls[j];
- compute_fixupimmps (&res_ref[0], s1.a[0], s2.a[0]);
+ compute_fixupimmps (&res_ref[0], res1.a[0], s1.a[0], s2.a[0]);
res1.x = _mm_fixupimm_ss (res1.x, s1.x, s2.x, 0);
res2.x = _mm_mask_fixupimm_ss (res2.x, mask, s1.x, s2.x, 0);