[llvm] [TTI] Remove masked/gather-scatter/strided/expand-compress costing from TTIImpl (PR #169885)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 00:18:01 PST 2025


================
@@ -928,6 +904,11 @@ class TargetTransformInfoImplBase {
   virtual InstructionCost
   getMemIntrinsicInstrCost(const MemIntrinsicCostAttributes &MICA,
                            TTI::TargetCostKind CostKind) const {
+    unsigned IID = MICA.getID();
+    bool IsStrided = IID == Intrinsic::experimental_vp_strided_load ||
+                     IID == Intrinsic::experimental_vp_strided_store;
+    if (IsStrided)
+      return InstructionCost::getInvalid();
     return 1;
----------------
lukel97 wrote:

Nit, it might be more future proof to have this as a switch statement that defaults to InstructionCost::getInvalid() but add case statements for masked/gather-scatter/expand-compress that return 1?

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


More information about the llvm-commits mailing list