[llvm] [TTI]Add support for strided loads/stores. (PR #80329)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 11:48:38 PST 2024
================
@@ -687,6 +691,15 @@ class TargetTransformInfoImplBase {
return 1;
}
+ InstructionCost getStridedMemoryOpCost(unsigned Opcode, Type *DataTy,
+ const Value *Ptr, bool VariableMask,
+ Align Alignment,
+ TTI::TargetCostKind CostKind,
+ const Instruction *I = nullptr) const {
+ return CostKind == TTI::TCK_RecipThroughput ? TTI::TCC_Expensive
----------------
preames wrote:
As I said in the review before you split, I would strongly prefer if this returned InstructionCost::getInvalid by default. TCC_Basic is fine for codesize of a legal strided access, but all others should return invalid.
https://github.com/llvm/llvm-project/pull/80329
More information about the llvm-commits
mailing list