[llvm] [VPlan] Implement interleaving as VPlan-to-VPlan transform. (PR #95842)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 13:03:58 PDT 2024


================
@@ -1948,6 +1968,12 @@ class VPWidenIntOrFpInductionRecipe : public VPHeaderPHIRecipe {
   VPValue *getVFValue() { return getOperand(2); }
   const VPValue *getVFValue() const { return getOperand(2); }
 
+  VPValue *getSplatVFValue() {
+    // If the recipe has been unrolled (4 operands), return the VPValue for the
+    // induction increment.
+    return getNumOperands() == 5 ? getOperand(3) : nullptr;
----------------
ayalz wrote:

```suggestion
    return getNumOperands() >= 4 ? getOperand(3) : nullptr;
```
suffice to ensure there's a 4th operand?

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


More information about the llvm-commits mailing list