[llvm] [VPlan] Introduce ComputeReductionResult VPInstruction opcode. (PR #70253)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 1 01:56:40 PST 2024
================
@@ -397,6 +398,130 @@ Value *VPInstruction::generateInstruction(VPTransformState &State,
Builder.GetInsertBlock()->getTerminator()->eraseFromParent();
return CondBr;
}
+ case VPInstruction::ComputeReductionResult: {
+ if (Part != 0)
+ return State.get(this, 0);
+
+ // FIXME: The cross-recipe dependency on VPReductionPHIRecipe is temporary
+ // and will be removed by breaking up the recipe further.
+ auto *PhiR = dyn_cast<VPReductionPHIRecipe>(getOperand(0));
----------------
ayalz wrote:
```suggestion
auto *PhiR = cast<VPReductionPHIRecipe>(getOperand(0));
```
https://github.com/llvm/llvm-project/pull/70253
More information about the llvm-commits
mailing list