[llvm] [LLVM] Add `llvm.masked.compress` intrinsic (PR #92289)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 08:57:43 PDT 2024


================
@@ -2362,6 +2362,11 @@ def int_masked_compressstore:
             [IntrWriteMem, IntrArgMemOnly, IntrWillReturn,
              NoCapture<ArgIndex<1>>]>;
 
+def int_masked_compress:
+    DefaultAttrsIntrinsic<[llvm_anyvector_ty],
+              [llvm_anyvector_ty, LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
----------------
lukel97 wrote:

I think we can enforce that the two input and output vector types match, something like
```suggestion
              [LLVMMatchType<0>, LLVMScalarOrSameVectorWidth<0, llvm_i1_ty>],
```

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


More information about the llvm-commits mailing list