summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c
new file mode 100644
index 00000000000..05f4bfc4252
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+
+CALC (long long *res, __mmask8 src)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ res[i] = src;
+}
+
+static void
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res;
+ long long res_ref[SIZE];
+ __mmask8 src;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res.a[i] = -1;
+ }
+
+ res.x = INTRINSIC (_broadcastmb_epi64) (src);
+
+ CALC (res_ref, src);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res, res_ref))
+ abort ();
+}