From: Sebastian Peryt Date: Tue, 9 May 2017 16:15:50 +0000 (+0200) Subject: avx512f-vaddsd-2.c: Test fixed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85282abcb27819d29dbb764cdbdb7fd8be5a53d0;p=gcc.git avx512f-vaddsd-2.c: Test fixed. * gcc.target/i386/avx512f-vaddsd-2.c: Test fixed. * gcc.target/i386/avx512f-vaddss-2.c: Ditto. * gcc.target/i386/avx512f-vsubsd-2.c: Ditto. * gcc.target/i386/avx512f-vsubss-2.c: Ditto. From-SVN: r247806 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 478a01688ff..d0c083d3494 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-05-09 Sebastian Peryt + + * gcc.target/i386/avx512f-vaddsd-2.c: Test fixed. + * gcc.target/i386/avx512f-vaddss-2.c: Ditto. + * gcc.target/i386/avx512f-vsubsd-2.c: Ditto. + * gcc.target/i386/avx512f-vsubss-2.c: Ditto. + 2017-05-09 Dominique d'Humieres PR testsuite/80611 diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-2.c index 8969d636aaf..b08b7fcdfe7 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-2.c @@ -12,11 +12,8 @@ static void calc_add (double *r, double *s1, double *s2) { - int i; - for (i = 0; i < SIZE; i++) - { - r[i] = s1[i] + s2[i]; - } + r[0] = s1[0] + s2[0]; + r[1] = s1[1]; } void @@ -48,22 +45,24 @@ avx512f_test (void) calc_add (res_ref, src1.a, src2.a); - MASK_MERGE (d) (res_ref, mask, SIZE); + MASK_MERGE (d) (res_ref, mask, 1); if (check_union128d (res1, res_ref)) abort (); - MASK_ZERO (d) (res_ref, mask, SIZE); + MASK_ZERO (d) (res_ref, mask, 1); if (check_union128d (res2, res_ref)) abort (); + calc_add (res_ref, src1.a, src2.a); + if (check_union128d (res3, res_ref)) abort(); - - MASK_MERGE (d) (res_ref, mask, SIZE); + + MASK_MERGE (d) (res_ref, mask, 1); if (check_union128d (res4, res_ref)) abort (); - MASK_ZERO (d) (res_ref, mask, SIZE); + MASK_ZERO (d) (res_ref, mask, 1); if (check_union128d (res5, res_ref)) abort (); } diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddss-2.c index 49c49c35530..f45a110cd3c 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vaddss-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddss-2.c @@ -12,11 +12,11 @@ static void calc_add (float *r, float *s1, float *s2) { + r[0] = s1[0] + s2[0]; + int i; - for (i = 0; i < SIZE; i++) - { - r[i] = s1[i] + s2[i]; - } + for (i = 1; i < SIZE; i++) + r[i] = s1[i]; } void @@ -48,22 +48,24 @@ avx512f_test (void) calc_add (res_ref, src1.a, src2.a); - MASK_MERGE () (res_ref, mask, SIZE); + MASK_MERGE () (res_ref, mask, 1); if (check_union128 (res1, res_ref)) abort (); - MASK_ZERO () (res_ref, mask, SIZE); + MASK_ZERO () (res_ref, mask, 1); if (check_union128 (res2, res_ref)) abort (); + calc_add (res_ref, src1.a, src2.a); + if (check_union128 (res3, res_ref)) abort(); - MASK_MERGE () (res_ref, mask, SIZE); + MASK_MERGE () (res_ref, mask, 1); if (check_union128 (res4, res_ref)) abort (); - MASK_ZERO () (res_ref, mask, SIZE); + MASK_ZERO () (res_ref, mask, 1); if (check_union128 (res5, res_ref)) abort (); } diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-2.c index 50585e5501d..5971ed97b7f 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-2.c @@ -12,11 +12,8 @@ static void calc_sub (double *r, double *s1, double *s2) { - int i; - for (i = 0; i < SIZE; i++) - { - r[i] = s1[i] - s2[i]; - } + r[0] = s1[0] - s2[0]; + r[1] = s1[1]; } void @@ -48,22 +45,24 @@ avx512f_test (void) calc_sub (res_ref, src1.a, src2.a); - MASK_MERGE (d) (res_ref, mask, SIZE); + MASK_MERGE (d) (res_ref, mask, 1); if (check_union128d (res1, res_ref)) abort (); - MASK_ZERO (d) (res_ref, mask, SIZE); + MASK_ZERO (d) (res_ref, mask, 1); if (check_union128d (res2, res_ref)) abort (); + calc_sub (res_ref, src1.a, src2.a); + if (check_union128d (res3, res_ref)) abort(); - MASK_MERGE (d) (res_ref, mask, SIZE); + MASK_MERGE (d) (res_ref, mask, 1); if (check_union128d (res4, res_ref)) abort (); - MASK_ZERO (d) (res_ref, mask, SIZE); + MASK_ZERO (d) (res_ref, mask, 1); if (check_union128d (res5, res_ref)) abort (); } diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubss-2.c index 60b3e95e503..25560a25133 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vsubss-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubss-2.c @@ -12,11 +12,10 @@ static void calc_sub (float *r, float *s1, float *s2) { + r[0] = s1[0] - s2[0]; int i; - for (i = 0; i < SIZE; i++) - { - r[i] = s1[i] - s2[i]; - } + for (i = 1; i < SIZE; i++) + r[i] = s1[i]; } void @@ -48,22 +47,24 @@ avx512f_test (void) calc_sub (res_ref, src1.a, src2.a); - MASK_MERGE () (res_ref, mask, SIZE); + MASK_MERGE () (res_ref, mask, 1); if (check_union128 (res1, res_ref)) abort (); - MASK_ZERO () (res_ref, mask, SIZE); + MASK_ZERO () (res_ref, mask, 1); if (check_union128 (res2, res_ref)) abort (); + calc_sub (res_ref, src1.a, src2.a); + if (check_union128 (res3, res_ref)) abort(); - MASK_MERGE () (res_ref, mask, SIZE); + MASK_MERGE () (res_ref, mask, 1); if (check_union128 (res4, res_ref)) abort (); - MASK_ZERO () (res_ref, mask, SIZE); + MASK_ZERO () (res_ref, mask, 1); if (check_union128 (res5, res_ref)) abort (); }