[llvm-branch-commits] [llvm] [RISCV] Return cost for scalable compressstore/expandload intrinsics (PR #225143)

Benjamin Maxwell via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 22 03:32:20 PDT 2026


================
@@ -3508,8 +3508,7 @@ bool RISCVTTIImpl::isLegalMaskedExpandLoad(Type *DataTy,
 
 bool RISCVTTIImpl::isLegalMaskedCompressStore(Type *DataTy,
                                               Align Alignment) const {
-  auto *VTy = dyn_cast<VectorType>(DataTy);
-  if (!VTy || VTy->isScalableTy())
+  if (!isa<VectorType>(DataTy))
     return false;
 
   if (!isLegalMaskedLoadStore(DataTy, Alignment))
----------------
MacDue wrote:

Just an FYI: In the LV change this is called with just the element type (similar to how `isLegalMaskedLoadOrStore` is). In that case, it's just expected to return true if there's any legal VF for that element type.

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


More information about the llvm-branch-commits mailing list