[llvm] [VectorUtils][VPlan] Consolidate VPWidenIntrinsicRecipe::onlyFirstLaneUsed and isVectorIntrinsicWithScalarOpAtArg (PR #137497)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 02:00:28 PDT 2025


================
@@ -149,6 +149,11 @@ bool llvm::isVectorIntrinsicWithScalarOpAtArg(Intrinsic::ID ID,
   if (TTI && Intrinsic::isTargetIntrinsic(ID))
     return TTI->isTargetIntrinsicWithScalarOpAtArg(ID, ScalarOpdIdx);
 
+  // Vector predication intrinsics only demand the the first lane the last
+  // operand (the EVL operand).
----------------
fhahn wrote:

```suggestion
  // Vector predication intrinsics only demand the first lane of the EVL operand.
```

There's no reference to the last argument here, as this uses `VPIntrinsic::getVectorLengthParamPos`, so better to first mention that this is for the EVL operand?

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


More information about the llvm-commits mailing list