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

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 07:08:58 PST 2024


================
@@ -1027,6 +1027,10 @@ InstructionCost VPWidenIntrinsicRecipe::computeCost(ElementCount VF,
   for (const auto &[Idx, Op] : enumerate(operands())) {
     auto *V = Op->getUnderlyingValue();
     if (!V) {
+      if (VPIntrinsic::isVPIntrinsic(VectorIntrinsicID)) {
+        Arguments.push_back(V);
+        break;
+      }
----------------
Mel-Chen wrote:

Confirmed, only evl is nullptr currently.
If so, I recommend adding assertion here.
```suggestion
      if (VPIntrinsic::isVPIntrinsic(VectorIntrinsicID)) {
        assert(VPIntrinsic::getVectorLengthParamPos(VectorIntrinsicID) == Idx && 
               "Unexpected null operand of vp intrinsic");
        Arguments.push_back(V);
        break;
      }
```

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


More information about the llvm-commits mailing list