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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 06:01:06 PDT 2024


================
@@ -1024,6 +1033,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);
----------------
fhahn wrote:

So this looks up the non-VP intrinsic ID and computes the cost using it? At least needs a comment, but if they have the same costs, the cost model should return the expected cost?

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


More information about the llvm-commits mailing list