[llvm] [VPlan] Add support for VPWidenIntOrFpInductionRecipe in predicated D… (PR #115274)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 04:47:43 PST 2024


================
@@ -1022,6 +1023,8 @@ bool VPWidenIntrinsicRecipe::onlyFirstLaneUsed(const VPValue *Op) const {
   assert(is_contained(operands(), Op) && "Op must be an operand of the recipe");
   // Vector predication intrinsics only demand the the first lane the last
   // operand (the EVL operand).
+  if (VectorIntrinsicID == Intrinsic::experimental_vp_splat)
+    return Op == getOperand(0);
   return VPIntrinsic::isVPIntrinsic(VectorIntrinsicID) &&
          Op == getOperand(getNumOperands() - 1);
----------------
Mel-Chen wrote:

So where you will need this?
IIUC, If this change is only for `VPIntrinsicRecipe::execute`, the change in `isVectorIntrinsicWithScalarOpAtArg` should be good enough. 
```
    if (isVectorIntrinsicWithScalarOpAtArg(VectorIntrinsicID, I.index()))
      Arg = State.get(I.value(), VPLane(0));
```
Is there anything else I'm missing that needs this change?

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


More information about the llvm-commits mailing list