[llvm] [LV][EVL] Support call instruction with EVL-vectorization (PR #110412)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 23:11:32 PDT 2024


================
@@ -1023,6 +1038,18 @@ InstructionCost VPWidenIntrinsicRecipe::computeCost(ElementCount VF,
   // clear Arguments.
   // TODO: Rework TTI interface to be independent of concrete IR values.
   SmallVector<const Value *> Arguments;
+
+  Intrinsic::ID FID = VectorIntrinsicID;
+  unsigned NumOperands = getNumOperands();
+  if (VPIntrinsic::isVPIntrinsic(VectorIntrinsicID)) {
+    std::optional<Intrinsic::ID> ID =
+        VPIntrinsic::getFunctionalIntrinsicIDForVP(VectorIntrinsicID);
+    if (ID) {
+      FID = ID.value();
----------------
arcbbb wrote:

@LiqinWeng I am aware that getCmpSelectInstrCost requires a predicate to estimate its cost. However, getIntrinsicInstrCost currently lacks a mechanism to provide this information.
Besides these, are there other vp intrinsics that necessitate their non-vp counter part for cost estimation?

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


More information about the llvm-commits mailing list