[llvm] [TTI][Vectorize] Migrate masked/gather-scatter/strided/expand-compress costing (NFCI) (PR #165532)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 02:07:51 PST 2025


================
@@ -1678,6 +1632,20 @@ class TargetTransformInfo {
   LLVM_ABI InstructionCost getIntrinsicInstrCost(
       const IntrinsicCostAttributes &ICA, TTI::TargetCostKind CostKind) const;
 
+  /// \returns The cost of memory Intrinsic instructions.
+  /// It is used when IntrinsicInst is not meterialized.
+  /// \p DataTy - a vector type of the data to be loaded or stored
+  /// \p Ptr - pointer [or vector of pointers] - address[es] in memory
+  /// \p VariableMask - true when the memory access is predicated with a mask
+  ///                   that is not a compile-time constant
+  /// \p Alignment - alignment of single element
+  /// \p I - the optional original context instruction, if one exists, e.g. the
+  ///        load/store to transform or the call to the gather/scatter intrinsic
----------------
lukel97 wrote:

We should probably find a better way to model the extending/truncating logic that ARM's MVE TTI needs. I don't think plumbing through the instruction is ideal, but for another PR :)

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


More information about the llvm-commits mailing list