aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
index d885800..7293772 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
@@ -9,6 +9,7 @@
#endif
#include "avx10-helper.h"
#include <limits.h>
+#include <string.h>
#define SRC_SIZE (AVX512F_LEN / 64)
#define SIZE (AVX512F_LEN_HALF / 32)
@@ -36,7 +37,7 @@ TEST (void)
UNION_TYPE (AVX512F_LEN, d) s;
UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
MASK_TYPE mask = MASK_VALUE;
- int res_ref[SIZE] = { 0 };
+ int res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
int i, sign = 1;
for (i = 0; i < SRC_SIZE; i++)
@@ -48,17 +49,12 @@ TEST (void)
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
-#if AVX512F_LEN == 128
- res1.x = INTRINSIC (_cvttspd_epi32) (s.x);
- res2.x = INTRINSIC (_mask_cvttspd_epi32) (res2.x, mask, s.x);
- res3.x = INTRINSIC (_maskz_cvttspd_epi32) (mask, s.x);
-#else
- res1.x = INTRINSIC (_cvtts_roundpd_epi32) (s.x, 8);
- res2.x = INTRINSIC (_mask_cvtts_roundpd_epi32) (res2.x, mask, s.x, 8);
- res3.x = INTRINSIC (_maskz_cvtts_roundpd_epi32) (mask, s.x, 8);
-#endif
+ res1.x = INTRINSIC (_cvtts_pd_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtts_pd_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtts_pd_epi32) (mask, s.x);
CALC (s.a, res_ref);
+ memcpy(res_ref2, res_ref, sizeof(res_ref));
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
abort ();
@@ -70,4 +66,24 @@ TEST (void)
MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
abort ();
+
+#if AVX512F_LEN != 128
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtts_roundpd_epi32) (s.x, 8);
+ res2.x = INTRINSIC (_mask_cvtts_roundpd_epi32) (res2.x, mask, s.x, 8);
+ res3.x = INTRINSIC (_maskz_cvtts_roundpd_epi32) (mask, s.x, 8);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref2))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref2, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref2))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref2, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref2))
+ abort ();
+#endif
}