From f6a02135809ecd378be0aea256381af0fc79935c Mon Sep 17 00:00:00 2001 From: Wei Xiao Date: Thu, 17 Jan 2019 10:01:07 +0000 Subject: [PATCH] avx512f-vfixupimmpd-2.c: Fix the test cases for VFIXUPIMM* intrinsics. gcc/testsuite/ChangeLog 2019-01-17 Wei Xiao * 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. From-SVN: r268014 --- gcc/ChangeLog | 1 - gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c | 8 ++++---- gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c | 10 +++++----- gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c | 8 ++++---- gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c | 8 ++++---- 6 files changed, 25 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f65833a1742..7eeb89acd63 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,7 +2,6 @@ PR target/88794 Revert: - 2018-11-06 Wei Xiao * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 60b308bc234..5425e8261a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2019-01-17 Wei Xiao + + * 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 PR target/88794 diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c index 7ce980632db..98b5ed1c1c7 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c @@ -14,12 +14,12 @@ 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; @@ -81,7 +81,7 @@ TEST (void) 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; @@ -96,7 +96,7 @@ TEST (void) 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); diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c index ffd899eaa50..e5a917f121c 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c @@ -13,12 +13,12 @@ #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; @@ -81,8 +81,8 @@ TEST (void) 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, @@ -101,7 +101,7 @@ TEST (void) 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); diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c index 62c8d4eff14..d3cd28cbeef 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c @@ -10,12 +10,12 @@ #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; @@ -76,7 +76,7 @@ avx512f_test (void) 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 @@ -98,7 +98,7 @@ avx512f_test (void) 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); diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c index 26f45a09497..7364cc5b9a9 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c @@ -10,12 +10,12 @@ #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; @@ -76,7 +76,7 @@ avx512f_test (void) 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 @@ -99,7 +99,7 @@ avx512f_test (void) 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); -- 2.30.2