[llvm] [VPlan] Support multiple F(Max|Min)Num reductions. (PR #161735)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 02:04:06 PST 2025
================
@@ -879,52 +867,72 @@ bool VPlanTransforms::handleMaxMinNumReductions(VPlan &Plan) {
}
VPBasicBlock *LatchVPBB = LoopRegion->getExitingBasicBlock();
+ VPBasicBlock *MiddleVPBB = Plan.getMiddleBlock();
+ VPBuilder MiddleBuilder(MiddleVPBB, MiddleVPBB->begin());
VPBuilder Builder(LatchVPBB->getTerminator());
----------------
ayalz wrote:
```suggestion
VPBuilder LatchBuilder(LatchVPBB->getTerminator());
```
consistent with `MiddleBuilder`.
Can be pre-applied independently.
https://github.com/llvm/llvm-project/pull/161735
More information about the llvm-commits
mailing list