diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c index 6d0ba5f..0d5797e 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c @@ -9,6 +9,7 @@ #endif #include "avx10-helper.h" #include <limits.h> +#include <string.h> #define SRC_SIZE (AVX512F_LEN_HALF / 32) #define SIZE (AVX512F_LEN / 64) @@ -36,7 +37,7 @@ TEST (void) UNION_TYPE (AVX512F_LEN_HALF, ) s; UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3; MASK_TYPE mask = MASK_VALUE; - long long res_ref[SIZE] = { 0 }; + long long res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 }; int i, sign = 1; for (i = 0; i < SRC_SIZE; i++) @@ -48,18 +49,12 @@ TEST (void) for (i = 0; i < SIZE; i++) res2.a[i] = DEFAULT_VALUE; -#if AVX512F_LEN == 128 - res1.x = INTRINSIC (_cvttsps_epi64) (s.x); - res2.x = INTRINSIC (_mask_cvttsps_epi64) (res2.x, mask, s.x); - res3.x = INTRINSIC (_maskz_cvttsps_epi64) (mask, s.x); -#else - res1.x = INTRINSIC (_cvtts_roundps_epi64) (s.x, 8); - res2.x = INTRINSIC (_mask_cvtts_roundps_epi64) (res2.x, mask, s.x, 8); - res3.x = INTRINSIC (_maskz_cvtts_roundps_epi64) (mask, s.x, 8); -#endif + res1.x = INTRINSIC (_cvtts_ps_epi64) (s.x); + res2.x = INTRINSIC (_mask_cvtts_ps_epi64) (res2.x, mask, s.x); + res3.x = INTRINSIC (_maskz_cvtts_ps_epi64) (mask, s.x); CALC (s.a, res_ref); - + memcpy(res_ref2, res_ref, sizeof(res_ref)); if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref)) abort (); @@ -71,4 +66,24 @@ TEST (void) MASK_ZERO (i_q) (res_ref, mask, SIZE); if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref)) abort (); + +#if AVX512F_LEN != 128 + for (i = 0; i < SIZE; i++) + res2.a[i] = DEFAULT_VALUE; + + res1.x = INTRINSIC (_cvtts_roundps_epi64) (s.x, 8); + res2.x = INTRINSIC (_mask_cvtts_roundps_epi64) (res2.x, mask, s.x, 8); + res3.x = INTRINSIC (_maskz_cvtts_roundps_epi64) (mask, s.x, 8); + + if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref2)) + abort (); + + MASK_MERGE (i_q) (res_ref2, mask, SIZE); + if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref2)) + abort (); + + MASK_ZERO (i_q) (res_ref2, mask, SIZE); + if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref2)) + abort (); +#endif } |