[clang] [CIR] Upstream convert to mask builtins in CIR codegen (PR #171694)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 09:38:23 PST 2025


================
@@ -3226,6 +3226,18 @@ __m256i test_mm256_movm_epi8(__mmask32 __A) {
   return _mm256_movm_epi8(__A); 
 }
 
+__m512i test_mm512_movm_epi8(__mmask64 __A) {
+  // CIR-LABEL: _mm512_movm_epi8
+  // CIR: %{{.*}} = cir.cast bitcast %{{.*}} : !u64i -> !cir.vector<!cir.int<s, 1> x 64>
+  // CIR: %{{.*}} = cir.cast integral %{{.*}} : !cir.vector<!cir.int<s, 1> x 64> -> !cir.vector<{{!s8i|!u8i}} x 64>
+
+  // LLVM-LABEL: @test_mm512_movm_epi8
+  // LLVM:  %{{.*}} = bitcast i64 %{{.*}} to <64 x i1>
+  // LLVM:  %{{.*}} = sext <64 x i1> %{{.*}} to <64 x i8>
+  return _mm512_movm_epi8(__A); 
----------------
andykaylor wrote:

You're modifying the wrong version of this test. You should be making changes in `/clang/test/CIR/CodeGenBuiltins/avx512vlbw-builtins.c` (which doesn't exist yet upstream). Note the `CIR` part of that path.

https://github.com/llvm/llvm-project/pull/171694


More information about the cfe-commits mailing list