summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c
index 29db77723b1..e732d442f94 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-2.c
@@ -20,7 +20,7 @@ void
avx512f_test (void)
{
int i, sign;
- union128d res1, res2, res3, src1, src2;
+ union128d res1, res2, res3, res4, res5, src1, src2;
MASK_TYPE mask = MASK_VALUE;
double res_ref[SIZE];
@@ -29,26 +29,38 @@ avx512f_test (void)
{
src1.a[i] = 1.5 + 34.67 * i * sign;
src2.a[i] = -22.17 * i * sign + 1.0;
+ res1.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
sign = sign * -1;
}
- for (i = 0; i < SIZE; i++)
- res2.a[i] = DEFAULT_VALUE;
- res1.x = _mm_max_round_sd (src1.x, src2.x, _MM_FROUND_NO_EXC);
- res2.x = _mm_mask_max_round_sd (res2.x, mask, src1.x, src2.x, _MM_FROUND_NO_EXC);
- res3.x = _mm_maskz_max_round_sd (mask, src1.x, src2.x, _MM_FROUND_NO_EXC);
+ res1.x = _mm_mask_max_sd (res1.x, mask, src1.x, src2.x);
+ res2.x = _mm_maskz_max_sd (mask, src1.x, src2.x);
+ res3.x = _mm_max_round_sd (src1.x, src2.x, _MM_FROUND_NO_EXC);
+ res4.x = _mm_mask_max_round_sd (res4.x, mask, src1.x, src2.x, _MM_FROUND_NO_EXC);
+ res5.x = _mm_maskz_max_round_sd (mask, src1.x, src2.x, _MM_FROUND_NO_EXC);
calc_max (res_ref, src1.a, src2.a);
+ MASK_MERGE (d) (res_ref, mask, 1);
if (check_union128d (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 1);
+ if (check_union128d (res2, res_ref))
+ abort ();
+
+ calc_max (res_ref, src1.a, src2.a);
+
+ if (check_union128d (res3, res_ref))
abort();
MASK_MERGE (d) (res_ref, mask, 1);
- if (check_union128d (res2, res_ref))
+ if (check_union128d (res4, res_ref))
abort ();
MASK_ZERO (d) (res_ref, mask, 1);
- if (check_union128d (res3, res_ref))
+ if (check_union128d (res5, res_ref))
abort ();
}