* 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
+2017-05-09 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ * 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 <dominiq@lps.ens.fr>
PR testsuite/80611
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
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 ();
}
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
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 ();
}
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
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 ();
}
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
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 ();
}