[llvm] [TTI] Add alignment argument to TTI for compress/expand support (PR #83516)

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 06:18:22 PST 2024


================
@@ -1609,3 +1609,28 @@ bool RISCVTTIImpl::isLSRCostLess(const TargetTransformInfo::LSRCost &C1,
                   C2.NumIVMuls, C2.NumBaseAdds,
                   C2.ScaleCost, C2.ImmCost, C2.SetupCost);
 }
+
+bool RISCVTTIImpl::isLegalMaskedCompressStore(Type *DataTy, Align Alignment) {
+  auto *VTy = dyn_cast<VectorType>(DataTy);
+  if (!VTy || VTy->isScalableTy() || !ST->hasVInstructions())
+    return false;
+
+  Type *ScalarTy = VTy->getScalarType();
+  if (ScalarTy->isFloatTy() || ScalarTy->isDoubleTy())
----------------
nikolaypanchenko wrote:

thanks. I was looking for this before, but didn't know where I can find it. Will move the change to #83457

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


More information about the llvm-commits mailing list