[2/6] Support AVX10.1 for AVX512DQ+AVX512VL intrins

Message ID 20230808072004.1570107-1-haochen.jiang@intel.com
State Accepted
Headers
Series None |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Jiang, Haochen Aug. 8, 2023, 7:20 a.m. UTC
  gcc/testsuite/ChangeLog:

	* gcc.target/i386/avx10_1-vandnpd-1.c: New test.
	* gcc.target/i386/avx10_1-vandnps-1.c: Ditto.
	* gcc.target/i386/avx10_1-vbroadcastf32x2-1.c: Ditto.
	* gcc.target/i386/avx10_1-vbroadcastf64x2-1.c: Ditto.
	* gcc.target/i386/avx10_1-vbroadcasti32x2-1.c: Ditto.
	* gcc.target/i386/avx10_1-vbroadcasti64x2-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvtpd2qq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvtpd2uqq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvttpd2qq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvttpd2uqq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvttps2qq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vcvttps2uqq-1.c: Ditto.
	* gcc.target/i386/avx10_1-vpmullq-1.c: Ditto.
---
 .../gcc.target/i386/avx10_1-vandnpd-1.c       | 21 +++++++++++++
 .../gcc.target/i386/avx10_1-vandnps-1.c       | 21 +++++++++++++
 .../i386/avx10_1-vbroadcastf32x2-1.c          | 19 ++++++++++++
 .../i386/avx10_1-vbroadcastf64x2-1.c          | 19 ++++++++++++
 .../i386/avx10_1-vbroadcasti32x2-1.c          | 25 ++++++++++++++++
 .../i386/avx10_1-vbroadcasti64x2-1.c          | 19 ++++++++++++
 .../gcc.target/i386/avx10_1-vcvtpd2qq-1.c     | 29 ++++++++++++++++++
 .../gcc.target/i386/avx10_1-vcvtpd2uqq-1.c    | 29 ++++++++++++++++++
 .../gcc.target/i386/avx10_1-vcvttpd2qq-1.c    | 30 +++++++++++++++++++
 .../gcc.target/i386/avx10_1-vcvttpd2uqq-1.c   | 29 ++++++++++++++++++
 .../gcc.target/i386/avx10_1-vcvttps2qq-1.c    | 27 +++++++++++++++++
 .../gcc.target/i386/avx10_1-vcvttps2uqq-1.c   | 26 ++++++++++++++++
 .../gcc.target/i386/avx10_1-vpmullq-1.c       | 24 +++++++++++++++
 13 files changed, 318 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c
 create mode 100644 gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c
  

Patch

diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c
new file mode 100644
index 00000000000..a9a8bd7ca8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vandnpd-1.c
@@ -0,0 +1,21 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnpd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d y;
+volatile __m128d x;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  y = _mm256_mask_andnot_pd (y, m, y, y);
+  y = _mm256_maskz_andnot_pd (m, y, y);
+  x = _mm_mask_andnot_pd (x, m, x, x);
+  x = _mm_maskz_andnot_pd (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c
new file mode 100644
index 00000000000..c33141021cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vandnps-1.c
@@ -0,0 +1,21 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vandnps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256 y;
+volatile __m128 x;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  y = _mm256_mask_andnot_ps (y, m, y, y);
+  y = _mm256_maskz_andnot_ps (m, y, y);
+  x = _mm_mask_andnot_ps (x, m, x, x);
+  x = _mm_maskz_andnot_ps (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c
new file mode 100644
index 00000000000..b6d73714282
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf32x2-1.c
@@ -0,0 +1,19 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}{z}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256 x;
+volatile __m128 y;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  x = _mm256_broadcast_f32x2 (y);
+  x = _mm256_mask_broadcast_f32x2 (x, m, y);
+  x = _mm256_maskz_broadcast_f32x2 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c
new file mode 100644
index 00000000000..26a391552c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcastf64x2-1.c
@@ -0,0 +1,19 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}|vshuff64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d y;
+volatile __m128d x;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  y = _mm256_broadcast_f64x2 (x);
+  y = _mm256_mask_broadcast_f64x2 (y, m, x);
+  y = _mm256_maskz_broadcast_f64x2 (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c
new file mode 100644
index 00000000000..b26e2a3f33a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti32x2-1.c
@@ -0,0 +1,25 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x2\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  x = _mm256_broadcast_i32x2 (y);
+  x = _mm256_mask_broadcast_i32x2 (x, m, y);
+  x = _mm256_maskz_broadcast_i32x2 (m, y);
+  y = _mm_broadcast_i32x2 (y);
+  y = _mm_mask_broadcast_i32x2 (y, m, y);
+  y = _mm_maskz_broadcast_i32x2 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c
new file mode 100644
index 00000000000..29e255a8724
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vbroadcasti64x2-1.c
@@ -0,0 +1,19 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x2\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}|vshufi64x2\[ \\t\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i y;
+volatile __m128i x;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  y = _mm256_broadcast_i64x2 (x);
+  y = _mm256_mask_broadcast_i64x2 (y, m, x);
+  y = _mm256_maskz_broadcast_i64x2 (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c
new file mode 100644
index 00000000000..ec213071f68
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2qq-1.c
@@ -0,0 +1,29 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d s1;
+volatile __m128d s2;
+volatile __m256i res1;
+volatile __m128i res2;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  res1 = _mm256_cvtpd_epi64 (s1);
+  res2 = _mm_cvtpd_epi64 (s2);
+
+  res1 = _mm256_mask_cvtpd_epi64 (res1, m, s1);
+  res2 = _mm_mask_cvtpd_epi64 (res2, m, s2);
+
+  res1 = _mm256_maskz_cvtpd_epi64 (m, s1);
+  res2 = _mm_maskz_cvtpd_epi64 (m, s2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c
new file mode 100644
index 00000000000..d84e96860c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvtpd2uqq-1.c
@@ -0,0 +1,29 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d s1;
+volatile __m128d s2;
+volatile __m256i res1;
+volatile __m128i res2;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  res1 = _mm256_cvtpd_epu64 (s1);
+  res2 = _mm_cvtpd_epu64 (s2);
+
+  res1 = _mm256_mask_cvtpd_epu64 (res1, m, s1);
+  res2 = _mm_mask_cvtpd_epu64 (res2, m, s2);
+
+  res1 = _mm256_maskz_cvtpd_epu64 (m, s1);
+  res2 = _mm_maskz_cvtpd_epu64 (m, s2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c
new file mode 100644
index 00000000000..a677176102f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2qq-1.c
@@ -0,0 +1,30 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d s1;
+volatile __m128d s2;
+volatile __m256i res1;
+volatile __m128i res2;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  res1 = _mm256_cvttpd_epi64 (s1);
+  res2 = _mm_cvttpd_epi64 (s2);
+
+  res1 = _mm256_mask_cvttpd_epi64 (res1, m, s1);
+  res2 = _mm_mask_cvttpd_epi64 (res2, m, s2);
+
+  res1 = _mm256_maskz_cvttpd_epi64 (m, s1);
+  res2 = _mm_maskz_cvttpd_epi64 (m, s2);
+
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c
new file mode 100644
index 00000000000..d970b2ee633
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttpd2uqq-1.c
@@ -0,0 +1,29 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256d s1;
+volatile __m128d s2;
+volatile __m256i res1;
+volatile __m128i res2;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  res1 = _mm256_cvttpd_epu64 (s1);
+  res2 = _mm_cvttpd_epu64 (s2);
+
+  res1 = _mm256_mask_cvttpd_epu64 (res1, m, s1);
+  res2 = _mm_mask_cvttpd_epu64 (res2, m, s2);
+
+  res1 = _mm256_maskz_cvttpd_epu64 (m, s1);
+  res2 = _mm_maskz_cvttpd_epu64 (m, s2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c
new file mode 100644
index 00000000000..95610023b3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2qq-1.c
@@ -0,0 +1,27 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i x1;
+volatile __m128i x2;
+volatile __m256 z1;
+volatile __m128 z2;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  x1 = _mm256_cvttps_epi64 (z2);
+  x1 = _mm256_mask_cvttps_epi64 (x1, m, z2);
+  x1 = _mm256_maskz_cvttps_epi64 (m, z2);
+  x2 = _mm_cvttps_epi64 (z2);
+  x2 = _mm_mask_cvttps_epi64 (x2, m, z2);
+  x2 = _mm_maskz_cvttps_epi64 (m, z2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c
new file mode 100644
index 00000000000..8e42fcf9caf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vcvttps2uqq-1.c
@@ -0,0 +1,26 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i x1;
+volatile __m128i x2;
+volatile __m128 z;
+volatile __mmask8 m;
+
+void extern
+avx10_1_test (void)
+{
+  x1 = _mm256_cvttps_epu64 (z);
+  x1 = _mm256_mask_cvttps_epu64 (x1, m, z);
+  x1 = _mm256_maskz_cvttps_epu64 (m, z);
+  x2 = _mm_cvttps_epu64 (z);
+  x2 = _mm_mask_cvttps_epu64 (x2, m, z);
+  x2 = _mm_maskz_cvttps_epu64 (m, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c
new file mode 100644
index 00000000000..a26fc70c1dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-vpmullq-1.c
@@ -0,0 +1,24 @@ 
+/* { dg-do compile } */
+/* { dg-options "-mavx10.1 -O2" } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)"  1 } } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vpmullq\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i _x1, _y1, _z1;
+volatile __m128i _x2, _y2, _z2;
+
+void extern
+avx10_1_test (void)
+{
+  _x2 = _mm_mullo_epi64 (_y2, _z2);
+  _x2 = _mm_mask_mullo_epi64 (_x2, 2, _y2, _z2);
+  _x2 = _mm_maskz_mullo_epi64 (2, _y2, _z2);
+  _x1 = _mm256_mullo_epi64 (_y1, _z1);
+  _x1 = _mm256_mask_mullo_epi64 (_x1, 3, _y1, _z1);
+  _x1 = _mm256_maskz_mullo_epi64 (3, _y1, _z1);
+}