[llvm] [AArch64][SDAG] Enable +sme2p2/+sve2p2 lowering for compressstore (PR #218624)

Jack Styles via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 03:54:05 PDT 2026


================
@@ -334,13 +334,20 @@ class AArch64TTIImpl final : public BasicTTIImplBase<AArch64TTIImpl> {
   }
 
   bool isElementTypeLegalForCompressStore(Type *Ty) const {
-    return Ty->isFloatTy() || Ty->isDoubleTy() || Ty->isIntegerTy(32) ||
+    // For streaming SME2p2, only consider 8bit or 16bit Scalar types.
+    if ((ST->isStreamingSVEAvailable() && ST->hasSME2p2()))
+      return Ty->isIntegerTy(8) || Ty->getScalarSizeInBits() == 16;
+
+    return ((ST->hasSVE2p2() || ST->hasSME2p2()) &&
+            (Ty->isIntegerTy(8) || Ty->getScalarSizeInBits() == 16)) ||
+           Ty->isFloatTy() || Ty->isDoubleTy() || Ty->isIntegerTy(32) ||
            Ty->isIntegerTy(64);
----------------
Stylie777 wrote:

Done

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


More information about the llvm-commits mailing list