diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c index 3f4d3aa1179..0fb7883de05 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c @@ -10,10 +10,11 @@ #include "avx512f-mask-type.h" #include <limits.h> -CALC (char *r, long long *s) +CALC (char *r, long long *s, int mem) { int i; - for (i = 0; i < 16; i++) + int len = mem ? 8 : 16; + for (i = 0; i < len; i++) { if (s[i] < CHAR_MIN) r[i] = CHAR_MIN; @@ -30,9 +31,11 @@ TEST (void) { int i, sign; UNION_TYPE (128, i_b) res1, res2, res3; + char res4[16]; UNION_TYPE (AVX512F_LEN, i_q) src; MASK_TYPE mask = MASK_VALUE; char res_ref[16]; + char res_ref2[16]; sign = -1; for (i = 0; i < SIZE; i++) @@ -40,13 +43,20 @@ TEST (void) src.a[i] = 1 + 34 * i * sign; sign = sign * -1; res2.a[i] = DEFAULT_VALUE; + res4[i] = DEFAULT_VALUE; + } + + for (i = SIZE; i < 16; i++) + { + res_ref2[i] = DEFAULT_VALUE * 2; + res4[i] = DEFAULT_VALUE * 2; } res1.x = INTRINSIC (_cvtsepi64_epi8) (src.x); res2.x = INTRINSIC (_mask_cvtsepi64_epi8) (res2.x, mask, src.x); res3.x = INTRINSIC (_maskz_cvtsepi64_epi8) (mask, src.x); - CALC (res_ref, src.a); + CALC (res_ref, src.a, 0); if (UNION_CHECK (128, i_b) (res1, res_ref)) abort (); @@ -58,4 +68,12 @@ TEST (void) MASK_ZERO (i_b) (res_ref, mask, SIZE); if (UNION_CHECK (128, i_b) (res3, res_ref)) abort (); + + INTRINSIC (_mask_cvtsepi64_storeu_epi8) (res4, mask, src.x); + + CALC (res_ref2, src.a, 1); + MASK_MERGE (i_b) (res_ref2, mask, SIZE); + + if (checkVc (res4, res_ref2, 16)) + abort (); } |