[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 09:52:10 PST 2025
================
@@ -332,6 +332,48 @@ 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 {
+ auto VecTy = cast<VectorType>(DataType);
+ Type *ElTy = VecTy->getScalarType();
+ unsigned ElSizeInBits = ElTy->getScalarSizeInBits();
+ TypeSize VecSizeInBits = VecTy->getPrimitiveSizeInBits();
+
+ if (isa<FixedVectorType>(VecTy)) {
+ // Each 128-bit segment must contain 2 or 4 elements (packed).
+ if (ElSizeInBits != 32 && ElSizeInBits != 64)
+ return false;
+ if (VecSizeInBits % 128 != 0 ||
+ VecSizeInBits > std::max(128U, ST->getMinSVEVectorSizeInBits()))
----------------
MacDue wrote:
I don't think so :+1: I didn't realize splitting was working
https://github.com/llvm/llvm-project/pull/168350
More information about the llvm-commits
mailing list