diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c index b11ab1b..369cb64 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c @@ -10,6 +10,7 @@ #include "avx10-helper.h" #include <limits.h> #include <math.h> +#include <string.h> #define SIZE (AVX512F_LEN / 32) #include "avx512f-mask-type.h" @@ -38,7 +39,7 @@ TEST (void) UNION_TYPE (AVX512F_LEN, ) s; UNION_TYPE (AVX512F_LEN, 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 < SIZE; i++) @@ -50,17 +51,12 @@ TEST (void) for (i = 0; i < SIZE; i++) res2.a[i] = DEFAULT_VALUE; -#if AVX512F_LEN == 128 - res1.x = INTRINSIC (_ipcvtps_epi32) (s.x); - res2.x = INTRINSIC (_mask_ipcvtps_epi32) (res2.x, mask, s.x); - res3.x = INTRINSIC (_maskz_ipcvtps_epi32) (mask, s.x); -#else - res1.x = INTRINSIC (_ipcvt_roundps_epi32) (s.x, 8); - res2.x = INTRINSIC (_mask_ipcvt_roundps_epi32) (res2.x, mask, s.x, 8); - res3.x = INTRINSIC (_maskz_ipcvt_roundps_epi32) (mask, s.x, 8); -#endif + res1.x = INTRINSIC (_ipcvts_ps_epi8) (s.x); + res2.x = INTRINSIC (_mask_ipcvts_ps_epi8) (res2.x, mask, s.x); + res3.x = INTRINSIC (_maskz_ipcvts_ps_epi8) (mask, s.x); CALC (s.a, res_ref); + memcpy(res_ref2, res_ref, sizeof(res_ref)); if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref)) abort (); @@ -72,4 +68,24 @@ TEST (void) MASK_ZERO (i_d) (res_ref, mask, SIZE); if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref)) abort (); + +#if AVX512F_LEN != 128 + for (i = 0; i < SIZE; i++) + res2.a[i] = DEFAULT_VALUE; + + res1.x = INTRINSIC (_ipcvts_roundps_epi8) (s.x, 8); + res2.x = INTRINSIC (_mask_ipcvts_roundps_epi8) (res2.x, mask, s.x, 8); + res3.x = INTRINSIC (_maskz_ipcvts_roundps_epi8) (mask, s.x, 8); + + if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2)) + abort (); + + MASK_MERGE (i_d) (res_ref2, mask, SIZE); + if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2)) + abort (); + + MASK_ZERO (i_d) (res_ref2, mask, SIZE); + if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2)) + abort (); +#endif } |