i386: Fix AVX10.2 SAT CVT testcases.
Init res_ref2 for rounding control intrinsics. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Fix testcase. * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto. * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto.
This commit is contained in:
parent
e0b3eeb67f
commit
8d236c53c6
15 changed files with 165 additions and 90 deletions
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 16)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -37,7 +38,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, h) s;
|
||||
UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
short res_ref[SIZE] = { 0 };
|
||||
short res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -54,6 +55,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvts_ph_epi8) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -67,19 +69,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvts_roundph_epi8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvts_roundph_epi8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvts_roundph_epi8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
|
||||
MASK_MERGE (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
|
||||
MASK_ZERO (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 16)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -37,7 +38,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, h) s;
|
||||
UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
short res_ref[SIZE] = { 0 };
|
||||
short res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -54,6 +55,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvts_ph_epu8) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -67,19 +69,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvts_roundph_epu8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvts_roundph_epu8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvts_roundph_epu8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
|
||||
MASK_MERGE (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
|
||||
MASK_ZERO (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
@ -55,6 +56,7 @@ TEST (void)
|
|||
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 ();
|
||||
|
@ -68,19 +70,22 @@ TEST (void)
|
|||
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_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
|
||||
MASK_MERGE (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -36,7 +37,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++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvts_ps_epu8) (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 ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvts_roundps_epu8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvts_roundps_epu8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvts_roundps_epu8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
|
||||
MASK_MERGE (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
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 ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
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_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
|
||||
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_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -35,7 +36,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, d) 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 < SIZE; i++)
|
||||
|
@ -52,6 +53,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_pd_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 ();
|
||||
|
@ -65,19 +67,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundpd_epi64) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundpd_epi64) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundpd_epi64) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_q) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
|
||||
MASK_MERGE (i_q) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_q) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
|
||||
MASK_ZERO (i_q) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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_ud) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
unsigned int res_ref[SIZE] = { 0 };
|
||||
unsigned int res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SRC_SIZE; i++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_pd_epu32) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundpd_epu32) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundpd_epu32) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundpd_epu32) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_ud) (res_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res2, res_ref))
|
||||
MASK_MERGE (i_ud) (res_ref2, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_ud) (res_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res3, res_ref))
|
||||
MASK_ZERO (i_ud) (res_ref2, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 64)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -35,7 +36,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, d) s;
|
||||
UNION_TYPE (AVX512F_LEN, i_uq) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
unsigned long long res_ref[SIZE] = { 0 };
|
||||
unsigned long long res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -52,6 +53,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_pd_epu64) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -65,19 +67,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundpd_epu64) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundpd_epu64) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundpd_epu64) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_uq) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res2, res_ref))
|
||||
MASK_MERGE (i_uq) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_uq) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref))
|
||||
MASK_ZERO (i_uq) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 16)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -37,7 +38,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, h) s;
|
||||
UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
short res_ref[SIZE] = { 0 };
|
||||
short res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -54,6 +55,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvtts_ph_epi8) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -67,19 +69,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvtts_roundph_epi8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvtts_roundph_epi8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvtts_roundph_epi8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
|
||||
MASK_MERGE (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_w) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
|
||||
MASK_ZERO (i_w) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 32)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -35,7 +36,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];
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -52,6 +53,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_ps_epi32) (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 ();
|
||||
|
@ -65,19 +67,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundps_epi32) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundps_epi32) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundps_epi32) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
|
||||
MASK_MERGE (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
@ -55,6 +56,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvtts_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 ();
|
||||
|
@ -68,19 +70,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvtts_roundps_epi8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvtts_roundps_epi8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvtts_roundps_epi8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
|
||||
MASK_MERGE (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -36,7 +37,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++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_ipcvtts_ps_epu8) (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 ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_ipcvtts_roundps_epu8) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_ipcvtts_roundps_epu8) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_ipcvtts_roundps_epu8) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
|
||||
MASK_MERGE (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_d) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
|
||||
MASK_ZERO (i_d) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
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 ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
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_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_q) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
|
||||
MASK_MERGE (i_q) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_q) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
|
||||
MASK_ZERO (i_q) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#endif
|
||||
#include "avx10-helper.h"
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define SIZE (AVX512F_LEN / 32)
|
||||
#include "avx512f-mask-type.h"
|
||||
|
@ -35,7 +36,7 @@ TEST (void)
|
|||
UNION_TYPE (AVX512F_LEN, ) s;
|
||||
UNION_TYPE (AVX512F_LEN, i_ud) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
unsigned int res_ref[SIZE] = { 0 };
|
||||
unsigned int res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SIZE; i++)
|
||||
|
@ -52,6 +53,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_ps_epu32) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -65,19 +67,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundps_epu32) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundps_epu32) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundps_epu32) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_ud) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res2, res_ref))
|
||||
MASK_MERGE (i_ud) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_ud) (res_ref, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res3, res_ref))
|
||||
MASK_ZERO (i_ud) (res_ref2, mask, SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_ud) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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_uq) res1, res2, res3;
|
||||
MASK_TYPE mask = MASK_VALUE;
|
||||
unsigned long long res_ref[SIZE] = { 0 };
|
||||
unsigned long long res_ref[SIZE] = { 0 }, res_ref2[SIZE] = { 0 };
|
||||
int i, sign = 1;
|
||||
|
||||
for (i = 0; i < SRC_SIZE; i++)
|
||||
|
@ -53,6 +54,7 @@ TEST (void)
|
|||
res3.x = INTRINSIC (_maskz_cvtts_ps_epu64) (mask, s.x);
|
||||
|
||||
CALC (s.a, res_ref);
|
||||
memcpy(res_ref2, res_ref, sizeof(res_ref));
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref))
|
||||
abort ();
|
||||
|
@ -66,19 +68,22 @@ TEST (void)
|
|||
abort ();
|
||||
|
||||
#if AVX512F_LEN != 128
|
||||
for (i = 0; i < SIZE; i++)
|
||||
res2.a[i] = DEFAULT_VALUE;
|
||||
|
||||
res1.x = INTRINSIC (_cvtts_roundps_epu64) (s.x, 8);
|
||||
res2.x = INTRINSIC (_mask_cvtts_roundps_epu64) (res2.x, mask, s.x, 8);
|
||||
res3.x = INTRINSIC (_maskz_cvtts_roundps_epu64) (mask, s.x, 8);
|
||||
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref))
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_MERGE (i_uq) (res_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res2, res_ref))
|
||||
MASK_MERGE (i_uq) (res_ref2, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res2, res_ref2))
|
||||
abort ();
|
||||
|
||||
MASK_ZERO (i_uq) (res_ref, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref))
|
||||
MASK_ZERO (i_uq) (res_ref2, mask, SRC_SIZE);
|
||||
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref2))
|
||||
abort ();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue