[llvm] [AArch64][SVE] Add basic support for `@llvm.masked.compressstore` (PR #168350)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 24 03:01:22 PST 2025


================
@@ -333,6 +333,29 @@ class AArch64TTIImpl final : public BasicTTIImplBase<AArch64TTIImpl> {
     return isLegalMaskedLoadStore(DataType, Alignment);
   }
 
+  bool isElementTypeLegalForCompressStore(Type *Ty) const {
+    if (Ty->isFloatTy() || Ty->isDoubleTy())
+      return true;
+
+    if (Ty->isIntegerTy(8) || Ty->isIntegerTy(16) || Ty->isIntegerTy(32) ||
+        Ty->isIntegerTy(64))
+      return true;
+
+    return false;
+  }
+
+  bool isLegalMaskedCompressStore(Type *DataType,
+                                  Align Alignment) const override {
+    ElementCount EC = cast<VectorType>(DataType)->getElementCount();
+    if (EC.getKnownMinValue() != 2 && EC.getKnownMinValue() != 4)
----------------
MacDue wrote:

Done :+1: 

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


More information about the llvm-commits mailing list