[llvm] [VPlan] Extract reverse operation for reverse accesses (PR #146525)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 06:09:52 PDT 2025


================
@@ -1541,6 +1541,12 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
                           cast<VectorType>(ICA.getArgTypes()[0]), {}, CostKind,
                           0, cast<VectorType>(ICA.getReturnType()));
   }
+  case Intrinsic::experimental_vp_reverse: {
+    return getShuffleCost(TTI::SK_Reverse,
+                          cast<VectorType>(ICA.getReturnType()),
+                          cast<VectorType>(ICA.getArgTypes()[0]), {}, CostKind,
+                          0, cast<VectorType>(ICA.getReturnType()));
+  }
   }
----------------
lukel97 wrote:

Argh we still weren't providing a type based cost for llvm.vector.reverse, which llvm.experimental.vp.reverse uses for its cost. Should be fixed by https://github.com/llvm/llvm-project/pull/150415

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


More information about the llvm-commits mailing list