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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 01:27:17 PDT 2026


================
@@ -334,6 +334,11 @@ class AArch64TTIImpl final : public BasicTTIImplBase<AArch64TTIImpl> {
   }
 
   bool isElementTypeLegalForCompressStore(Type *Ty) const {
+    if ((ST->hasSVE2p2() || ST->hasSME2p2()) &&
+        ((Ty->isIntegerTy(8) || Ty->isIntegerTy(16)) ||
+         ((Ty->isHalfTy() || Ty->isBFloatTy()) &&
+          Ty->getScalarSizeInBits() == 16)))
----------------
sdesmalen-arm wrote:

I would expect that the difference between 'float' and 'integer' doesn't really matter here, as it's about compressing and storing "bags of bits", so it would be sufficient to write: `Ty->getScalarSizeInBits() == 16`. (same for the 32/64-bit cases below)

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


More information about the llvm-commits mailing list