summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
new file mode 100644
index 00000000000..91665b299ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-broadcast-gpr-1.c"
+
+void
+avx512f_test (void)
+{
+ union512i_q q;
+ union512i_d d;
+ int i;
+
+ q.x = foo_1 (3);
+ d.x = foo_2 (5);
+
+ for (i = 0; i < 8; i++)
+ {
+ if (q.a[i] != 3)
+ abort ();
+ }
+
+ for (i = 0; i < 16; i++)
+ {
+ if (d.a[i] != 5)
+ abort ();
+ }
+}