summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
index 6fe9effd6a0..e4f21a6e4b1 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
@@ -9,13 +9,17 @@
#define SIZE (AVX512F_LEN / 32)
#include "avx512f-mask-type.h"
-static void
+void
TEST (void)
{
UNION_TYPE (AVX512F_LEN,) val;
UNION_TYPE (AVX512F_LEN_HALF, i_w) res1,res2,res3;
MASK_TYPE mask = MASK_VALUE;
+#if AVX512F_LEN == 128
+ short exp[SIZE * 2];
+#else
short exp[SIZE];
+#endif
int i;
for (i = 0; i < SIZE; i++)
@@ -55,6 +59,11 @@ TEST (void)
exp[5] = 0xc000;
exp[6] = 0xc400;
exp[7] = 0xc800;
+#else
+ exp[4] = 0;
+ exp[5] = 0;
+ exp[6] = 0;
+ exp[7] = 0;
#endif
#if AVX512F_LEN > 256
exp[8] = 0x3c00;
@@ -67,9 +76,9 @@ TEST (void)
exp[15] = 0xc800;
#endif
- res1.x = _mm512_cvtps_ph (val.x, 0);
- res2.x = _mm512_mask_cvtps_ph (res2.x, mask, val.x, 0);
- res3.x = _mm512_maskz_cvtps_ph (mask, val.x, 0);
+ res1.x = INTRINSIC (_cvtps_ph (val.x, 0));
+ res2.x = INTRINSIC (_mask_cvtps_ph (res2.x, mask, val.x, 0));
+ res3.x = INTRINSIC (_maskz_cvtps_ph (mask, val.x, 0));
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res1, exp))
abort ();