[llvm] [VPlan] Add ReductionStartVector VPInstruction. (PR #142290)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 02:55:10 PDT 2025


================
@@ -395,6 +397,10 @@ static unsigned getVFScaleFactor(VPRecipeBase *R) {
     return RR->getVFScaleFactor();
   if (auto *RR = dyn_cast<VPPartialReductionRecipe>(R))
     return RR->getVFScaleFactor();
+  if (auto *VPI = dyn_cast<VPInstruction>(R))
+    assert(
+        VPI->getOpcode() != VPInstruction::ReductionStartVector &&
+        "getting scaling factor of reduction-start-vector not implemented yet");
----------------
Mel-Chen wrote:

```suggestion
  assert((!isa<VPInstruction>(R) ||
      cast<VPInstruction>(R)->getOpcode() != VPInstruction::ReductionStartVector) &&
      "getting scaling factor of reduction-start-vector not implemented yet");
```

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


More information about the llvm-commits mailing list