summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-03 23:45:56 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-03 23:45:56 +0000
commitfe644b69d013e77c7fc2db2a9863969d4f564561 (patch)
treea2cb1398bd46b8decaea84f1b7de8c7cd35e6046 /gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
parent90079d10dd355193fe289fa0bfcb0d7be880d45a (diff)
parent04e0495a6da35f3b0bcedbd75908cb6e9ba8ff8f (diff)
downloadgcc-fe644b69d013e77c7fc2db2a9863969d4f564561.tar.gz
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@206327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
new file mode 100644
index 00000000000..a8f8f10b6be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "knotw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (45) );
+
+ k2 = _mm512_knot (k1);
+
+ x = _mm512_mask_add_ps (x, k1, x, x);
+ x = _mm512_mask_add_ps (x, k2, x, x);
+}