https://github.com/shri-acha updated 
https://github.com/llvm/llvm-project/pull/169452

>From dccf63b4def97b6836384343a724813ce0459cfd Mon Sep 17 00:00:00 2001
From: shri-acha <[email protected]>
Date: Tue, 25 Nov 2025 10:15:24 +0545
Subject: [PATCH 1/4] add: tests for _mm_cmp*_epi8

---
 clang/test/CodeGen/X86/avx512vlbw-builtins.c | 121 +++++++++++++++++--
 1 file changed, 112 insertions(+), 9 deletions(-)

diff --git a/clang/test/CodeGen/X86/avx512vlbw-builtins.c 
b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
index 16e113031bfda..cb69205664a3d 100644
--- a/clang/test/CodeGen/X86/avx512vlbw-builtins.c
+++ b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
@@ -645,20 +645,123 @@ __mmask16 test_mm_cmp_epi8_mask(__m128i __a, __m128i 
__b) {
   return (__mmask16)_mm_cmp_epi8_mask(__a, __b, 0);
 }
 
+// cmpeq tests
 TEST_CONSTEXPR(_mm_cmpeq_epi8_mask(
-    ((__m128i)(__v16qi){5, 3, 7, 2, 9, 3, 7, 1, 5, 4, 8, 2, 9, 6, 7, 5}),
-    ((__m128i)(__v16qi){5, 2, 7, 3, 9, 4, 6, 1, 5, 3, 8, 1, 9, 5, 7, 5})
-) == (__mmask16)0xd595);
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0xffff);
+
+TEST_CONSTEXPR(_mm_cmpeq_epi8_mask(
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0xffff);
+
+TEST_CONSTEXPR(_mm_cmpeq_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0x0000);
+
+TEST_CONSTEXPR(_mm_cmpeq_epi8_mask(
+    ((__m128i)(__v16qi){-31, 90, -66, 3, 27, -22, -64, 111, -87, 105, -19, 0, 
26, -111, 24, -72}),
+    ((__m128i)(__v16qi){-84, -98, 20, -83, -98, 80, -46, -9, 22, -120, -123, 
53, 117, -85, 50, 94})
+) == (__mmask16)0x0000);
+
+// cmpneq tests
+TEST_CONSTEXPR(_mm_cmpneq_epi8_mask(
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0x0000);
+
+TEST_CONSTEXPR(_mm_cmpneq_epi8_mask(
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0x0000);
+
+TEST_CONSTEXPR(_mm_cmpneq_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0xffff);
+
+TEST_CONSTEXPR(_mm_cmpneq_epi8_mask(
+    ((__m128i)(__v16qi){-2, 49, -5, -11, 21, -70, 121, -111, 20, 112, -121, 
18, -34, -73, 89, 122}),
+    ((__m128i)(__v16qi){14, 36, 2, 3, 118, 88, -126, -21, 104, -125, -1, 39, 
99, -12, 35, -126})
+) == (__mmask16)0xffff);
+
+// cmplt tests
+TEST_CONSTEXPR(_mm_cmplt_epi8_mask(
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0x0000);
 
 TEST_CONSTEXPR(_mm_cmplt_epi8_mask(
-    ((__m128i)(__v16qi){1, 5, 3, 7, 2, 8, 4, 6, 9, 5, 3, 11, 2, 6, 15, 8}),
-    ((__m128i)(__v16qi){2, 4, 6, 8, 3, 5, 7, 9, 4, 6, 8, 10, 5, 7, 9, 11})
-) == (__mmask16)0xb6dd);
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0x0000);
 
+TEST_CONSTEXPR(_mm_cmplt_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0x0000);
+
+TEST_CONSTEXPR(_mm_cmplt_epi8_mask(
+    ((__m128i)(__v16qi){-111, -10, -60, -123, -6, -110, -43, -32, -58, -7, 42, 
-128, -21, 24, 8, -101}),
+    ((__m128i)(__v16qi){-108, 30, 71, 73, 20, 117, 63, -93, 79, -30, 99, -100, 
34, 49, 83, 68})
+) == (__mmask16)0xfd7f);
+
+// cmple tests
+TEST_CONSTEXPR(_mm_cmple_epi8_mask(
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0xffff);
 TEST_CONSTEXPR(_mm_cmple_epi8_mask(
-    ((__m128i)(__v16qi){1, 3, 5, 7, 2, 6, 6, 8, 1, 3, 9, 7, 2, 4, 6, 10}),
-    ((__m128i)(__v16qi){2, 3, 4, 7, 3, 4, 5, 8, 2, 3, 4, 7, 3, 4, 5, 8})
-) == (__mmask16)0x3b9b);
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmple_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmple_epi8_mask(
+    ((__m128i)(__v16qi){122, 6, -22, -94, 78, -35, -43, -16, -69, 124, -2, 24, 
-117, 8, -17, 118}),
+    ((__m128i)(__v16qi){53, -50, 104, 11, 63, -77, -25, 102, 46, 62, 27, -28, 
-61, 68, 40, -65})
+) == (__mmask16)0x75cc);
+
+// cmpge tests
+TEST_CONSTEXPR(_mm_cmpge_epi8_mask(
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpge_epi8_mask(
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpge_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpge_epi8_mask(
+    ((__m128i)(__v16qi){-11, 0, 97, 123, -48, 105, 26, -118, 62, -86, -94, 
-32, 14, -4, -50, 72}),
+    ((__m128i)(__v16qi){-33, 49, 22, 31, -4, -81, 6, -22, 40, 127, -1, -106, 
6, -64, 12, 8})
+) == (__mmask16)0xb96d);
+
+// cmpgt tests
+TEST_CONSTEXPR(_mm_cmpgt_epi8_mask(
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}),
+    ((__m128i)(__v16qi){0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpgt_epi8_mask(
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}),
+    ((__m128i)(__v16qi){1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpgt_epi8_mask(
+    ((__m128i)(__v16qi){127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 
127, 127, 127, 127, 127}),
+    ((__m128i)(__v16qi){-128, -128, -128, -128, -128, -128, -128, -128, -128, 
-128, -128, -128, -128, -128, -128, -128})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpgt_epi8_mask(
+    ((__m128i)(__v16qi){-127, 37, -123, -60, 98, -68, -115, 96, 80, -27, -105, 
64, -6, -51, -45, -81}),
+    ((__m128i)(__v16qi){-124, 59, 8, 59, 122, 47, -74, 120, 19, -43, -33, -76, 
7, -22, -24, -14})
+) == (__mmask16)0x0b00);
+
 
 __mmask16 test_mm_mask_cmp_epi8_mask(__mmask16 __u, __m128i __a, __m128i __b) {
   // CHECK-LABEL: test_mm_mask_cmp_epi8_mask

>From 120d264fcb915cc47e5c2b88db17b662658f177a Mon Sep 17 00:00:00 2001
From: shri-acha <[email protected]>
Date: Tue, 25 Nov 2025 21:22:53 +0545
Subject: [PATCH 2/4] add tests for _mm_cmp*_epi16

---
 clang/test/CodeGen/X86/avx512vlbw-builtins.c | 135 +++++++++++++++++++
 1 file changed, 135 insertions(+)

diff --git a/clang/test/CodeGen/X86/avx512vlbw-builtins.c 
b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
index cb69205664a3d..3111c04ddd3e0 100644
--- a/clang/test/CodeGen/X86/avx512vlbw-builtins.c
+++ b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
@@ -762,6 +762,141 @@ TEST_CONSTEXPR(_mm_cmpgt_epi8_mask(
     ((__m128i)(__v16qi){-124, 59, 8, 59, 122, 47, -74, 120, 19, -43, -33, -76, 
7, -22, -24, -14})
 ) == (__mmask16)0x0b00);
 
+// _mm_cmp*_epi16_mask tests
+// cmpeq tests
+TEST_CONSTEXPR(_mm_cmpeq_epi16_mask(
+    ((__m128i)(__v8hi){-3442, 30871, -12144, -1454, -22826, -2857, -15573, 
31071}),
+    ((__m128i)(__v8hi){18051, 1305, 19877, 25257, -1276, -27260, -2189, 
-12561})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epi16_mask(
+    ((__m128i)(__v8hi){-30000, -12116, -26732, -25017, 1825, 22572, -23178, 
-19747}),
+    ((__m128i)(__v8hi){2100, 15453, 17949, -29756, 17479, -18870, -22571, 
-17226})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epi16_mask(
+    ((__m128i)(__v8hi){31014, -1995, -10083, -9515, 10226, -21525, 253, 
30999}),
+    ((__m128i)(__v8hi){-25332, -30218, 31439, 15484, -31344, 17581, -30883, 
-1427})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epi16_mask(
+    ((__m128i)(__v8hi){-9653, -20924, -20387, 285, -14945, 19791, 21735, 
-31655}),
+    ((__m128i)(__v8hi){-19129, -16192, 6453, -3246, -22032, 9464, -15122, 
-12084})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epi16_mask(
+    ((__m128i)(__v8hi){-24008, 21674, 8299, -31133, 23486, -29407, -15611, 
-7613}),
+    ((__m128i)(__v8hi){10079, -14333, 2802, 21711, -10849, 11468, -528, 
-18259})
+) == (__mmask8)0x00);
+
+// cmpneq tests
+TEST_CONSTEXPR(_mm_cmpneq_epi16_mask(
+    ((__m128i)(__v8hi){29745, -23358, -12495, -13908, 3162, -15181, -20831, 
-9264}),
+    ((__m128i)(__v8hi){-32594, -25364, -11888, -32704, 25399, -14592, -8293, 
-19662})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epi16_mask(
+    ((__m128i)(__v8hi){21379, -15275, -31427, -29628, 14433, 30414, -24752, 
119}),
+    ((__m128i)(__v8hi){-23650, -17663, 2882, -8677, -13639, -6226, -17564, 
-17024})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epi16_mask(
+    ((__m128i)(__v8hi){5659, -8091, 28040, 7676, 3226, -12548, 29893, 12766}),
+    ((__m128i)(__v8hi){23731, -3987, -27073, 5995, -5765, 10343, 21504, 
-18513})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epi16_mask(
+    ((__m128i)(__v8hi){17386, 29612, 28099, -8524, -7042, -23864, 13718, 
16802}),
+    ((__m128i)(__v8hi){8658, 5451, 782, -9208, 8027, 14983, -4011, -31827})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epi16_mask(
+    ((__m128i)(__v8hi){-24378, 20934, 25612, 4427, -29446, 26311, -2533, 
-27963}),
+    ((__m128i)(__v8hi){28538, -27232, 21741, -31546, -18083, 17112, -25750, 
-28016})
+) == (__mmask8)0xff);
+
+// cmplt tests
+TEST_CONSTEXPR(_mm_cmplt_epi16_mask(
+    ((__m128i)(__v8hi){13828, -2305, -29543, 13467, 13750, 4765, -20421, 
-1340}),
+    ((__m128i)(__v8hi){17531, 9112, -7503, -2262, 12476, -24405, 543, 24076})
+) == (__mmask8)0xc7);
+TEST_CONSTEXPR(_mm_cmplt_epi16_mask(
+    ((__m128i)(__v8hi){26544, 10625, -23568, -9115, -27479, -15046, -2294, 
17617}),
+    ((__m128i)(__v8hi){-17598, -27694, 3374, 32022, 25371, -3401, -1466, 
18741})
+) == (__mmask8)0xfc);
+TEST_CONSTEXPR(_mm_cmplt_epi16_mask(
+    ((__m128i)(__v8hi){-20731, -29738, 15746, 14938, -18069, -3978, 25561, 
-23366}),
+    ((__m128i)(__v8hi){12163, -26845, -19607, 12781, -2854, 23771, 6504, 
21136})
+) == (__mmask8)0xb3);
+TEST_CONSTEXPR(_mm_cmplt_epi16_mask(
+    ((__m128i)(__v8hi){2923, -3968, 11644, 28855, -6225, 32503, -10027, 
-18296}),
+    ((__m128i)(__v8hi){17481, -24809, 24058, -5767, -1033, 16133, -8332, 
-24426})
+) == (__mmask8)0x55);
+TEST_CONSTEXPR(_mm_cmplt_epi16_mask(
+    ((__m128i)(__v8hi){-23454, -12570, 28483, -2443, -10879, 21881, -27324, 
10746}),
+    ((__m128i)(__v8hi){31572, -12990, 27653, -25336, 26491, 21811, 19562, 
-27562})
+) == (__mmask8)0x51);
+
+// cmple tests
+TEST_CONSTEXPR(_mm_cmple_epi16_mask(
+    ((__m128i)(__v8hi){-13404, 5773, -2912, 12257, -21386, 12244, -25523, 
28508}),
+    ((__m128i)(__v8hi){2730, -15074, 7642, -15989, -17979, -8818, -28069, 
1577})
+) == (__mmask8)0x15);
+TEST_CONSTEXPR(_mm_cmple_epi16_mask(
+    ((__m128i)(__v8hi){-30681, 29588, -21231, 17008, 4229, -12947, -6153, 
-2183}),
+    ((__m128i)(__v8hi){-9893, 12451, 3221, 2418, 6992, -9738, 21000, 7839})
+) == (__mmask8)0xf5);
+TEST_CONSTEXPR(_mm_cmple_epi16_mask(
+    ((__m128i)(__v8hi){9571, 3844, 19158, 8637, 27094, -16447, -31005, 11095}),
+    ((__m128i)(__v8hi){3929, 901, 31907, 15912, 5595, -6562, -9664, -13180})
+) == (__mmask8)0x6c);
+TEST_CONSTEXPR(_mm_cmple_epi16_mask(
+    ((__m128i)(__v8hi){-29653, -19891, 32155, -13473, -1745, 23019, -30659, 
9319}),
+    ((__m128i)(__v8hi){11054, 23285, -27270, 31021, -2491, 7728, 30175, 3553})
+) == (__mmask8)0x4b);
+TEST_CONSTEXPR(_mm_cmple_epi16_mask(
+    ((__m128i)(__v8hi){10008, -28465, -29830, 22527, 8820, -32356, 15584, 
23957}),
+    ((__m128i)(__v8hi){-4691, 13730, -28788, -17664, 14597, -29281, -30463, 
7606})
+) == (__mmask8)0x36);
+
+// cmpge tests
+TEST_CONSTEXPR(_mm_cmpge_epi16_mask(
+    ((__m128i)(__v8hi){-11140, 18900, -28192, 12396, 12691, -17637, -5639, 
13640}),
+    ((__m128i)(__v8hi){13120, 27235, 31917, 5559, 31947, -16460, 12054, 
-11750})
+) == (__mmask8)0x88);
+TEST_CONSTEXPR(_mm_cmpge_epi16_mask(
+    ((__m128i)(__v8hi){29089, -626, 23207, 7124, 19598, 15564, 6422, 9504}),
+    ((__m128i)(__v8hi){-5950, -29409, -25182, 30585, -31424, -12209, 1669, 
-31761})
+) == (__mmask8)0xf7);
+TEST_CONSTEXPR(_mm_cmpge_epi16_mask(
+    ((__m128i)(__v8hi){-20490, -26633, -14323, -14815, -23375, 18639, 30382, 
10679}),
+    ((__m128i)(__v8hi){-19313, 26898, -1867, -31542, 25972, -24148, 14949, 
-21235})
+) == (__mmask8)0xe8);
+TEST_CONSTEXPR(_mm_cmpge_epi16_mask(
+    ((__m128i)(__v8hi){-1967, 20611, 17473, -3220, -8421, 23008, -4566, 
32760}),
+    ((__m128i)(__v8hi){6049, 26996, 3995, 3649, 22926, -31207, 5407, -25394})
+) == (__mmask8)0xa4);
+TEST_CONSTEXPR(_mm_cmpge_epi16_mask(
+    ((__m128i)(__v8hi){-29193, 9029, 15883, -20070, 12934, -20531, 32059, 
-16251}),
+    ((__m128i)(__v8hi){-392, -23600, 21384, 3664, -23762, -25166, 5219, -5042})
+) == (__mmask8)0x72);
+
+// cmpgt tests
+TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
+    ((__m128i)(__v8hi){15267, -11951, -5449, 23797, -2214, -9874, 9646, 
-21342}),
+    ((__m128i)(__v8hi){9306, 8824, 29545, 26005, 31680, -21215, 32078, 24049})
+) == (__mmask8)0x21);
+TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
+    ((__m128i)(__v8hi){31831, 31959, -26932, -29861, 24449, -4255, 28223, 
-21248}),
+    ((__m128i)(__v8hi){-7535, -25898, 21764, 20515, 18797, -7540, -9244, 
-8230})
+) == (__mmask8)0x73);
+TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
+    ((__m128i)(__v8hi){7503, -3478, 26774, -3300, 21598, -20865, 6044, -8590}),
+    ((__m128i)(__v8hi){5765, 29485, 26086, 13029, 7790, -24192, -14148, 
-25392})
+) == (__mmask8)0xf5);
+TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
+    ((__m128i)(__v8hi){5627, -22902, 25994, -19341, -30428, 6898, 29163, 
-9331}),
+    ((__m128i)(__v8hi){31016, -1554, 23610, -25442, 28669, 22077, 28653, 
22826})
+) == (__mmask8)0x4c);
+TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
+    ((__m128i)(__v8hi){-16014, 12488, 2614, -25164, -8107, -20887, -21726, 
32065}),
+    ((__m128i)(__v8hi){-32191, 26305, -6600, 3970, -31254, 30169, 22872, 
-2017})
+) == (__mmask8)0x95);
+
+
+
 
 __mmask16 test_mm_mask_cmp_epi8_mask(__mmask16 __u, __m128i __a, __m128i __b) {
   // CHECK-LABEL: test_mm_mask_cmp_epi8_mask

>From 448d362af17f0efc177af357de41166e3417526d Mon Sep 17 00:00:00 2001
From: shri-acha <[email protected]>
Date: Tue, 25 Nov 2025 21:26:33 +0545
Subject: [PATCH 3/4] add: tests for _mm_cmp*_epu8_mask

---
 clang/test/CodeGen/X86/avx512vlbw-builtins.c | 132 +++++++++++++++++++
 1 file changed, 132 insertions(+)

diff --git a/clang/test/CodeGen/X86/avx512vlbw-builtins.c 
b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
index 3111c04ddd3e0..a473e2cb4d35c 100644
--- a/clang/test/CodeGen/X86/avx512vlbw-builtins.c
+++ b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
@@ -895,6 +895,138 @@ TEST_CONSTEXPR(_mm_cmpgt_epi16_mask(
     ((__m128i)(__v8hi){-32191, 26305, -6600, 3970, -31254, 30169, 22872, 
-2017})
 ) == (__mmask8)0x95);
 
+// Test cases for _mm_cmp*_epu8_mask
+// cmpeq tests
+TEST_CONSTEXPR(_mm_cmpeq_epu8_mask(
+    ((__m128i)(__v16qu){16, 136, 12, 57, 51, 16, 77, 210, 75, 252, 75, 9, 225, 
11, 166, 94}),
+    ((__m128i)(__v16qu){225, 224, 24, 209, 45, 121, 99, 61, 10, 97, 27, 158, 
101, 233, 34, 12})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpeq_epu8_mask(
+    ((__m128i)(__v16qu){224, 224, 206, 52, 121, 157, 252, 238, 48, 100, 124, 
229, 100, 234, 30, 208}),
+    ((__m128i)(__v16qu){61, 95, 167, 40, 44, 237, 43, 102, 132, 252, 109, 244, 
185, 115, 205, 2})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpeq_epu8_mask(
+    ((__m128i)(__v16qu){12, 206, 18, 41, 83, 198, 246, 178, 153, 221, 101, 
107, 46, 116, 173, 28}),
+    ((__m128i)(__v16qu){127, 214, 9, 253, 109, 138, 48, 204, 110, 34, 91, 206, 
157, 216, 22, 157})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpeq_epu8_mask(
+    ((__m128i)(__v16qu){239, 95, 183, 64, 22, 28, 232, 140, 235, 134, 213, 29, 
47, 9, 75, 224}),
+    ((__m128i)(__v16qu){224, 78, 249, 228, 241, 3, 175, 176, 226, 242, 76, 
169, 231, 49, 135, 97})
+) == (__mmask16)0x0000);
+TEST_CONSTEXPR(_mm_cmpeq_epu8_mask(
+    ((__m128i)(__v16qu){145, 106, 8, 210, 56, 39, 72, 146, 99, 151, 112, 16, 
160, 80, 140, 70}),
+    ((__m128i)(__v16qu){203, 124, 25, 113, 140, 85, 126, 152, 170, 25, 6, 121, 
146, 40, 113, 57})
+) == (__mmask16)0x0000);
+
+// cmpneq tests
+TEST_CONSTEXPR(_mm_cmpneq_epu8_mask(
+    ((__m128i)(__v16qu){225, 50, 34, 45, 215, 179, 100, 173, 136, 135, 252, 
121, 217, 29, 82, 98}),
+    ((__m128i)(__v16qu){160, 184, 95, 94, 53, 251, 207, 101, 37, 176, 104, 54, 
21, 228, 221, 180})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpneq_epu8_mask(
+    ((__m128i)(__v16qu){25, 167, 250, 22, 212, 147, 54, 115, 226, 5, 240, 116, 
158, 154, 120, 134}),
+    ((__m128i)(__v16qu){142, 156, 34, 216, 124, 89, 209, 226, 119, 133, 230, 
19, 204, 218, 38, 124})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpneq_epu8_mask(
+    ((__m128i)(__v16qu){19, 219, 73, 161, 64, 71, 158, 100, 163, 157, 73, 111, 
208, 90, 168, 136}),
+    ((__m128i)(__v16qu){4, 15, 146, 12, 104, 227, 125, 133, 28, 148, 58, 111, 
107, 172, 181, 33})
+) == (__mmask16)0xf7ff);
+TEST_CONSTEXPR(_mm_cmpneq_epu8_mask(
+    ((__m128i)(__v16qu){134, 53, 253, 117, 213, 129, 192, 67, 243, 215, 233, 
223, 121, 100, 180, 173}),
+    ((__m128i)(__v16qu){4, 198, 27, 51, 149, 246, 28, 192, 18, 157, 214, 77, 
119, 147, 1, 28})
+) == (__mmask16)0xffff);
+TEST_CONSTEXPR(_mm_cmpneq_epu8_mask(
+    ((__m128i)(__v16qu){241, 10, 186, 52, 173, 193, 93, 240, 187, 30, 147, 
130, 221, 70, 210, 44}),
+    ((__m128i)(__v16qu){65, 145, 226, 92, 171, 211, 64, 61, 82, 183, 135, 205, 
124, 25, 81, 244})
+) == (__mmask16)0xffff);
+
+// cmplt tests
+TEST_CONSTEXPR(_mm_cmplt_epu8_mask(
+    ((__m128i)(__v16qu){188, 3, 27, 241, 77, 48, 233, 136, 166, 7, 248, 212, 
73, 41, 134, 236}),
+    ((__m128i)(__v16qu){99, 67, 183, 99, 117, 11, 225, 198, 61, 141, 198, 145, 
244, 68, 198, 52})
+) == (__mmask16)0x7296);
+TEST_CONSTEXPR(_mm_cmplt_epu8_mask(
+    ((__m128i)(__v16qu){90, 197, 4, 61, 147, 4, 63, 30, 93, 225, 249, 120, 
130, 225, 204, 27}),
+    ((__m128i)(__v16qu){131, 238, 224, 204, 79, 190, 139, 127, 145, 229, 163, 
118, 119, 15, 122, 71})
+) == (__mmask16)0x83ef);
+TEST_CONSTEXPR(_mm_cmplt_epu8_mask(
+    ((__m128i)(__v16qu){75, 44, 98, 1, 152, 251, 197, 192, 27, 36, 33, 183, 
80, 24, 217, 121}),
+    ((__m128i)(__v16qu){214, 10, 95, 115, 65, 179, 194, 230, 93, 92, 209, 78, 
32, 88, 119, 223})
+) == (__mmask16)0xa789);
+TEST_CONSTEXPR(_mm_cmplt_epu8_mask(
+    ((__m128i)(__v16qu){143, 136, 99, 215, 124, 156, 108, 234, 94, 186, 245, 
21, 253, 27, 218, 93}),
+    ((__m128i)(__v16qu){54, 248, 105, 21, 188, 253, 148, 114, 168, 96, 151, 
167, 185, 152, 37, 1})
+) == (__mmask16)0x2976);
+TEST_CONSTEXPR(_mm_cmplt_epu8_mask(
+    ((__m128i)(__v16qu){155, 8, 76, 39, 55, 79, 74, 78, 129, 144, 169, 84, 32, 
112, 201, 226}),
+    ((__m128i)(__v16qu){185, 107, 11, 239, 21, 120, 63, 105, 153, 148, 182, 2, 
0, 181, 144, 100})
+) == (__mmask16)0x27ab);
+
+// cmple tests
+TEST_CONSTEXPR(_mm_cmple_epu8_mask(
+    ((__m128i)(__v16qu){89, 172, 39, 168, 219, 32, 80, 82, 190, 122, 23, 37, 
15, 28, 217, 18}),
+    ((__m128i)(__v16qu){122, 245, 45, 82, 41, 70, 1, 117, 26, 169, 89, 160, 
147, 78, 105, 226})
+) == (__mmask16)0xbea7);
+TEST_CONSTEXPR(_mm_cmple_epu8_mask(
+    ((__m128i)(__v16qu){175, 250, 230, 32, 79, 107, 111, 206, 244, 181, 147, 
110, 95, 178, 7, 32}),
+    ((__m128i)(__v16qu){173, 117, 248, 184, 244, 190, 240, 65, 119, 215, 67, 
30, 252, 224, 86, 42})
+) == (__mmask16)0xf27c);
+TEST_CONSTEXPR(_mm_cmple_epu8_mask(
+    ((__m128i)(__v16qu){14, 90, 183, 71, 139, 11, 177, 242, 104, 66, 206, 15, 
214, 178, 91, 120}),
+    ((__m128i)(__v16qu){255, 3, 220, 86, 47, 19, 208, 93, 76, 231, 175, 247, 
111, 146, 51, 9})
+) == (__mmask16)0x0a6d);
+TEST_CONSTEXPR(_mm_cmple_epu8_mask(
+    ((__m128i)(__v16qu){104, 98, 30, 11, 120, 187, 239, 183, 105, 114, 48, 
201, 5, 5, 88, 10}),
+    ((__m128i)(__v16qu){145, 250, 12, 166, 92, 215, 45, 237, 122, 132, 41, 25, 
93, 15, 88, 32})
+) == (__mmask16)0xf3ab);
+TEST_CONSTEXPR(_mm_cmple_epu8_mask(
+    ((__m128i)(__v16qu){31, 238, 238, 163, 38, 109, 134, 50, 251, 250, 68, 2, 
132, 238, 236, 148}),
+    ((__m128i)(__v16qu){26, 223, 228, 186, 240, 53, 148, 56, 106, 196, 76, 
246, 114, 102, 237, 127})
+) == (__mmask16)0x4cd8);
+
+// cmpge tests
+TEST_CONSTEXPR(_mm_cmpge_epu8_mask(
+    ((__m128i)(__v16qu){209, 5, 40, 54, 128, 0, 44, 248, 51, 117, 117, 106, 
57, 231, 172, 234}),
+    ((__m128i)(__v16qu){127, 165, 98, 192, 238, 10, 85, 220, 132, 177, 167, 
233, 173, 232, 215, 90})
+) == (__mmask16)0x8081);
+TEST_CONSTEXPR(_mm_cmpge_epu8_mask(
+    ((__m128i)(__v16qu){41, 233, 30, 65, 230, 138, 250, 66, 252, 130, 119, 
231, 237, 228, 122, 34}),
+    ((__m128i)(__v16qu){71, 153, 86, 224, 213, 87, 212, 43, 234, 194, 148, 66, 
243, 238, 59, 221})
+) == (__mmask16)0x49f2);
+TEST_CONSTEXPR(_mm_cmpge_epu8_mask(
+    ((__m128i)(__v16qu){198, 89, 26, 129, 103, 127, 255, 110, 186, 70, 43, 10, 
12, 216, 254, 209}),
+    ((__m128i)(__v16qu){83, 120, 28, 162, 196, 225, 222, 24, 172, 30, 154, 
144, 65, 56, 94, 146})
+) == (__mmask16)0xe3c1);
+TEST_CONSTEXPR(_mm_cmpge_epu8_mask(
+    ((__m128i)(__v16qu){59, 193, 244, 59, 108, 159, 53, 244, 201, 6, 253, 224, 
211, 74, 146, 0}),
+    ((__m128i)(__v16qu){107, 244, 12, 240, 201, 25, 88, 46, 179, 174, 124, 99, 
112, 4, 69, 16})
+) == (__mmask16)0x7da4);
+TEST_CONSTEXPR(_mm_cmpge_epu8_mask(
+    ((__m128i)(__v16qu){165, 179, 185, 74, 129, 89, 42, 170, 195, 35, 151, 20, 
240, 155, 245, 254}),
+    ((__m128i)(__v16qu){104, 175, 83, 169, 96, 144, 164, 61, 6, 46, 150, 36, 
177, 188, 77, 147})
+) == (__mmask16)0xd597);
+
+// cmpgt tests
+TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
+    ((__m128i)(__v16qu){38, 190, 130, 195, 187, 214, 113, 247, 178, 29, 139, 
40, 157, 185, 136, 248}),
+    ((__m128i)(__v16qu){142, 87, 246, 176, 127, 177, 41, 209, 155, 139, 105, 
140, 191, 70, 15, 224})
+) == (__mmask16)0xe5fa);
+TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
+    ((__m128i)(__v16qu){64, 243, 108, 190, 6, 147, 219, 249, 213, 244, 43, 
185, 134, 167, 89, 98}),
+    ((__m128i)(__v16qu){249, 226, 180, 166, 53, 137, 244, 172, 105, 31, 30, 
43, 218, 96, 36, 140})
+) == (__mmask16)0x6faa);
+TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
+    ((__m128i)(__v16qu){66, 24, 106, 97, 243, 223, 111, 54, 33, 138, 171, 254, 
228, 155, 195, 178}),
+    ((__m128i)(__v16qu){204, 154, 118, 221, 206, 135, 119, 52, 84, 105, 228, 
68, 184, 244, 85, 243})
+) == (__mmask16)0x5ab0);
+TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
+    ((__m128i)(__v16qu){222, 143, 193, 146, 136, 215, 84, 82, 172, 158, 189, 
199, 246, 114, 149, 116}),
+    ((__m128i)(__v16qu){152, 16, 193, 198, 99, 235, 130, 181, 211, 129, 39, 
210, 94, 169, 4, 11})
+) == (__mmask16)0xd613);
+TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
+    ((__m128i)(__v16qu){25, 67, 207, 46, 203, 0, 89, 144, 93, 235, 192, 245, 
29, 67, 227, 66}),
+    ((__m128i)(__v16qu){59, 110, 28, 206, 112, 88, 82, 187, 108, 82, 224, 47, 
184, 168, 201, 105})
+) == (__mmask16)0x4a54);
 
 
 

>From e4e4e01a01afedaff7b9aa08fbabbad53f6d8b28 Mon Sep 17 00:00:00 2001
From: shri-acha <[email protected]>
Date: Tue, 25 Nov 2025 21:32:46 +0545
Subject: [PATCH 4/4] add: tests for _mm_cmp*_epu16_mask

---
 clang/test/CodeGen/X86/avx512vlbw-builtins.c | 133 +++++++++++++++++++
 1 file changed, 133 insertions(+)

diff --git a/clang/test/CodeGen/X86/avx512vlbw-builtins.c 
b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
index a473e2cb4d35c..341df150232f0 100644
--- a/clang/test/CodeGen/X86/avx512vlbw-builtins.c
+++ b/clang/test/CodeGen/X86/avx512vlbw-builtins.c
@@ -1028,6 +1028,139 @@ TEST_CONSTEXPR(_mm_cmpgt_epu8_mask(
     ((__m128i)(__v16qu){59, 110, 28, 206, 112, 88, 82, 187, 108, 82, 224, 47, 
184, 168, 201, 105})
 ) == (__mmask16)0x4a54);
 
+// Test cases for _mm_cmp*_epu16_mask
+// cmpeq tests
+TEST_CONSTEXPR(_mm_cmpeq_epu16_mask(
+    ((__m128i)(__v8hu){26017, 41021, 1946, 38661, 30561, 19297, 15060, 15737}),
+    ((__m128i)(__v8hu){8185, 18330, 37519, 42141, 61247, 31228, 6264, 59456})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epu16_mask(
+    ((__m128i)(__v8hu){36575, 60206, 3432, 10195, 34831, 43860, 40303, 49709}),
+    ((__m128i)(__v8hu){1432, 64285, 48336, 3804, 18528, 49977, 15597, 51759})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epu16_mask(
+    ((__m128i)(__v8hu){25178, 38322, 33003, 43178, 39760, 44915, 5994, 55537}),
+    ((__m128i)(__v8hu){34277, 7150, 30624, 59335, 51255, 12845, 65164, 3858})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epu16_mask(
+    ((__m128i)(__v8hu){57800, 61974, 13596, 50836, 40573, 216, 31321, 38806}),
+    ((__m128i)(__v8hu){28357, 61850, 47986, 47656, 1664, 36978, 15274, 60611})
+) == (__mmask8)0x00);
+TEST_CONSTEXPR(_mm_cmpeq_epu16_mask(
+    ((__m128i)(__v8hu){57064, 51949, 42152, 43038, 65515, 7797, 23751, 12389}),
+    ((__m128i)(__v8hu){38499, 21192, 9584, 15701, 4826, 6826, 47257, 20923})
+) == (__mmask8)0x00);
+
+// cmpneq tests
+TEST_CONSTEXPR(_mm_cmpneq_epu16_mask(
+    ((__m128i)(__v8hu){14257, 58047, 39173, 29624, 18365, 12002, 39567, 
46161}),
+    ((__m128i)(__v8hu){39492, 1657, 38848, 30475, 33784, 22129, 16165, 39862})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epu16_mask(
+    ((__m128i)(__v8hu){35289, 33907, 13787, 15259, 39250, 33252, 47224, 
23905}),
+    ((__m128i)(__v8hu){62303, 41983, 19416, 4638, 48011, 59449, 46768, 20704})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epu16_mask(
+    ((__m128i)(__v8hu){43035, 24266, 48861, 29042, 24252, 18719, 2345, 15378}),
+    ((__m128i)(__v8hu){12179, 44184, 13531, 23032, 7839, 49161, 39424, 17456})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epu16_mask(
+    ((__m128i)(__v8hu){30106, 39497, 21733, 28765, 52826, 54726, 50106, 
61970}),
+    ((__m128i)(__v8hu){34749, 64882, 7430, 10309, 26658, 22489, 34795, 35513})
+) == (__mmask8)0xff);
+TEST_CONSTEXPR(_mm_cmpneq_epu16_mask(
+    ((__m128i)(__v8hu){17033, 42616, 6158, 53144, 14513, 29528, 57905, 62537}),
+    ((__m128i)(__v8hu){38447, 51378, 320, 16853, 48397, 49715, 53668, 43839})
+) == (__mmask8)0xff);
+
+// cmplt tests
+TEST_CONSTEXPR(_mm_cmplt_epu16_mask(
+    ((__m128i)(__v8hu){12351, 47995, 11802, 16970, 16956, 13965, 33529, 
18928}),
+    ((__m128i)(__v8hu){48792, 59915, 50576, 62643, 3758, 16415, 7966, 39475})
+) == (__mmask8)0xaf);
+TEST_CONSTEXPR(_mm_cmplt_epu16_mask(
+    ((__m128i)(__v8hu){64376, 821, 6646, 56557, 41027, 54650, 38293, 65034}),
+    ((__m128i)(__v8hu){16194, 13150, 9765, 40643, 62592, 32105, 37358, 43042})
+) == (__mmask8)0x16);
+TEST_CONSTEXPR(_mm_cmplt_epu16_mask(
+    ((__m128i)(__v8hu){5197, 38111, 57400, 21773, 6778, 55251, 43022, 23599}),
+    ((__m128i)(__v8hu){25453, 44508, 11034, 51861, 28507, 3586, 50043, 22852})
+) == (__mmask8)0x5b);
+TEST_CONSTEXPR(_mm_cmplt_epu16_mask(
+    ((__m128i)(__v8hu){45352, 2829, 63457, 8858, 31243, 17792, 61465, 39468}),
+    ((__m128i)(__v8hu){36906, 65156, 12702, 36312, 25463, 30740, 17784, 16985})
+) == (__mmask8)0x2a);
+TEST_CONSTEXPR(_mm_cmplt_epu16_mask(
+    ((__m128i)(__v8hu){55773, 8388, 56635, 32082, 18204, 53351, 33529, 17025}),
+    ((__m128i)(__v8hu){40397, 47032, 24886, 11409, 5864, 42244, 24984, 9087})
+) == (__mmask8)0x02);
+
+// cmple tests
+TEST_CONSTEXPR(_mm_cmple_epu16_mask(
+    ((__m128i)(__v8hu){7117, 51838, 34713, 59818, 13657, 57172, 51354, 44657}),
+    ((__m128i)(__v8hu){43684, 29399, 39679, 60107, 61794, 25979, 20734, 59740})
+) == (__mmask8)0x9d);
+TEST_CONSTEXPR(_mm_cmple_epu16_mask(
+    ((__m128i)(__v8hu){34191, 12870, 38578, 50725, 13944, 40695, 8891, 56035}),
+    ((__m128i)(__v8hu){15935, 55419, 10154, 43268, 20049, 46161, 14264, 35221})
+) == (__mmask8)0x72);
+TEST_CONSTEXPR(_mm_cmple_epu16_mask(
+    ((__m128i)(__v8hu){33955, 56125, 59463, 56265, 62541, 27516, 15841, 
10852}),
+    ((__m128i)(__v8hu){110, 25696, 52299, 36663, 26130, 22670, 40665, 36384})
+) == (__mmask8)0xc0);
+TEST_CONSTEXPR(_mm_cmple_epu16_mask(
+    ((__m128i)(__v8hu){30109, 45669, 64670, 2417, 24233, 12069, 21306, 31838}),
+    ((__m128i)(__v8hu){41978, 40368, 4025, 37501, 5634, 43889, 27907, 243})
+) == (__mmask8)0x69);
+TEST_CONSTEXPR(_mm_cmple_epu16_mask(
+    ((__m128i)(__v8hu){30467, 14437, 9940, 54360, 37732, 61408, 1077, 33377}),
+    ((__m128i)(__v8hu){21329, 57575, 30740, 42725, 26374, 53724, 12, 11808})
+) == (__mmask8)0x06);
+
+// cmpge tests
+TEST_CONSTEXPR(_mm_cmpge_epu16_mask(
+    ((__m128i)(__v8hu){18151, 20516, 44819, 57353, 65147, 3123, 59838, 46999}),
+    ((__m128i)(__v8hu){55970, 31815, 16503, 37882, 46380, 47912, 2076, 33014})
+) == (__mmask8)0xdc);
+TEST_CONSTEXPR(_mm_cmpge_epu16_mask(
+    ((__m128i)(__v8hu){60160, 48803, 35124, 42510, 62783, 18767, 26220, 
16209}),
+    ((__m128i)(__v8hu){22162, 54330, 56847, 11199, 46429, 7012, 12165, 42137})
+) == (__mmask8)0x79);
+TEST_CONSTEXPR(_mm_cmpge_epu16_mask(
+    ((__m128i)(__v8hu){15118, 50748, 64103, 47033, 11223, 61427, 3201, 61926}),
+    ((__m128i)(__v8hu){19094, 30041, 5839, 62591, 59904, 1530, 40604, 34353})
+) == (__mmask8)0xa6);
+TEST_CONSTEXPR(_mm_cmpge_epu16_mask(
+    ((__m128i)(__v8hu){37865, 12467, 45289, 60251, 60268, 3908, 51781, 35681}),
+    ((__m128i)(__v8hu){30915, 32324, 1515, 24432, 15318, 33790, 22826, 64258})
+) == (__mmask8)0x5d);
+TEST_CONSTEXPR(_mm_cmpge_epu16_mask(
+    ((__m128i)(__v8hu){53950, 52988, 13868, 25190, 31823, 62039, 43379, 
51291}),
+    ((__m128i)(__v8hu){35593, 54830, 49773, 10890, 44742, 48266, 45280, 14226})
+) == (__mmask8)0xa9);
+
+// cmpgt tests
+TEST_CONSTEXPR(_mm_cmpgt_epu16_mask(
+    ((__m128i)(__v8hu){53569, 10332, 63903, 42861, 45572, 36510, 50522, 
36590}),
+    ((__m128i)(__v8hu){20661, 10192, 56056, 56939, 27398, 16004, 27165, 43131})
+) == (__mmask8)0x77);
+TEST_CONSTEXPR(_mm_cmpgt_epu16_mask(
+    ((__m128i)(__v8hu){64844, 511, 53950, 40143, 20601, 53105, 34756, 60447}),
+    ((__m128i)(__v8hu){20846, 55132, 57724, 35384, 25368, 41097, 3764, 52879})
+) == (__mmask8)0xe9);
+TEST_CONSTEXPR(_mm_cmpgt_epu16_mask(
+    ((__m128i)(__v8hu){64715, 31454, 34266, 43085, 52260, 7304, 25587, 43911}),
+    ((__m128i)(__v8hu){25076, 3569, 11981, 11259, 63537, 32468, 23699, 9601})
+) == (__mmask8)0xcf);
+TEST_CONSTEXPR(_mm_cmpgt_epu16_mask(
+    ((__m128i)(__v8hu){57954, 26888, 1708, 125, 19459, 44354, 29760, 23713}),
+    ((__m128i)(__v8hu){2188, 13828, 28514, 39528, 42286, 41311, 28270, 11063})
+) == (__mmask8)0xe3);
+TEST_CONSTEXPR(_mm_cmpgt_epu16_mask(
+    ((__m128i)(__v8hu){36435, 57842, 17322, 33066, 51263, 58618, 57550, 
23212}),
+    ((__m128i)(__v8hu){150, 39532, 62935, 34670, 57126, 9790, 21078, 3593})
+) == (__mmask8)0xe3);
+
 
 
 __mmask16 test_mm_mask_cmp_epi8_mask(__mmask16 __u, __m128i __a, __m128i __b) {

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to