[llvm] [RISCV] Support llvm.masked.expandload intrinsic (PR #101954)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 14:53:30 PDT 2024
================
@@ -2286,6 +2286,23 @@ bool RISCVTTIImpl::isLSRCostLess(const TargetTransformInfo::LSRCost &C1,
C2.ScaleCost, C2.ImmCost, C2.SetupCost);
}
+bool RISCVTTIImpl::isLegalMaskedExpandLoad(Type *DataTy, Align Alignment) {
+ auto *VTy = dyn_cast<VectorType>(DataTy);
+ if (!VTy || VTy->isScalableTy())
+ return false;
+
+ if (!isLegalMaskedLoadStore(DataTy, Alignment))
+ return false;
+
+ // FIXME: If it is an i8 vector and the element count exceeds 256, we should
+ // scalarize these types with LMUL >= maximum fixed-length LMUL.
+ if (VTy->getElementType()->isIntegerTy(8))
----------------
lukel97 wrote:
I believe so, see https://github.com/llvm/llvm-project/blob/0e35b2cae23d906189c6e68d1e5a96e62f336d23/llvm/test/CodeGen/RISCV/rvv/expandload.ll#L1611
https://github.com/llvm/llvm-project/pull/101954
More information about the llvm-commits
mailing list